Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generic event source #895

Merged
merged 11 commits into from
Oct 12, 2020
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ hack/**/debug
debug.test
*.iml
.coverage
*.out
*.out
site/
51 changes: 49 additions & 2 deletions api/event-source.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 88 additions & 2 deletions api/event-source.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 23 additions & 3 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions eventsources/eventing.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/argoproj/argo-events/eventsources/sources/emitter"
"github.com/argoproj/argo-events/eventsources/sources/file"
"github.com/argoproj/argo-events/eventsources/sources/gcppubsub"
"github.com/argoproj/argo-events/eventsources/sources/generic"
"github.com/argoproj/argo-events/eventsources/sources/github"
"github.com/argoproj/argo-events/eventsources/sources/gitlab"
"github.com/argoproj/argo-events/eventsources/sources/hdfs"
Expand Down Expand Up @@ -223,6 +224,13 @@ func GetEventingServers(eventSource *v1alpha1.EventSource) map[apicommon.EventSo
}
result[apicommon.PulsarEvent] = servers
}
if len(eventSource.Spec.Generic) != 0 {
VaibhavPage marked this conversation as resolved.
Show resolved Hide resolved
servers := []EventingServer{}
for k, v := range eventSource.Spec.Generic {
servers = append(servers, &generic.EventListener{EventSourceName: eventSource.Name, EventName: k, GenericEventSource: v})
}
result[apicommon.GenericEvent] = servers
}
return result
}

Expand Down
Loading