Skip to content

Commit

Permalink
wip: extension
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie committed Feb 21, 2024
1 parent 0547816 commit 913a7b1
Show file tree
Hide file tree
Showing 118 changed files with 9,018 additions and 0 deletions.
61 changes: 61 additions & 0 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package main

import (
"os"

"knative.dev/pkg/injection"
"knative.dev/pkg/injection/sharedmain"
"knative.dev/pkg/signals"

"github.com/zeiss/typhoon/pkg/extensions/reconciler/function"
"github.com/zeiss/typhoon/pkg/flow/reconciler/jqtransformation"
"github.com/zeiss/typhoon/pkg/flow/reconciler/synchronizer"
"github.com/zeiss/typhoon/pkg/flow/reconciler/transformation"
"github.com/zeiss/typhoon/pkg/flow/reconciler/xmltojsontransformation"
"github.com/zeiss/typhoon/pkg/flow/reconciler/xslttransformation"
"github.com/zeiss/typhoon/pkg/routing/reconciler/filter"
"github.com/zeiss/typhoon/pkg/routing/reconciler/splitter"
"github.com/zeiss/typhoon/pkg/sources/reconciler/cloudeventssource"
"github.com/zeiss/typhoon/pkg/sources/reconciler/httppollersource"
"github.com/zeiss/typhoon/pkg/sources/reconciler/kafkasource"
"github.com/zeiss/typhoon/pkg/sources/reconciler/webhooksource"
"github.com/zeiss/typhoon/pkg/targets/reconciler/cloudeventstarget"
"github.com/zeiss/typhoon/pkg/targets/reconciler/httptarget"
"github.com/zeiss/typhoon/pkg/targets/reconciler/kafkatarget"
"github.com/zeiss/typhoon/pkg/targets/reconciler/logzmetricstarget"
"github.com/zeiss/typhoon/pkg/targets/reconciler/logztarget"
"github.com/zeiss/typhoon/pkg/targets/reconciler/splunktarget"
)

func main() {
ctx := signals.NewContext()

if namespace, set := os.LookupEnv("WORKING_NAMESPACE"); set {
ctx = injection.WithNamespaceScope(ctx, namespace)
}

sharedmain.MainWithContext(ctx, "typhoon-controller",
cloudeventssource.NewController,
httppollersource.NewController,
kafkasource.NewController,
webhooksource.NewController,

cloudeventstarget.NewController,
httptarget.NewController,
kafkatarget.NewController,
logztarget.NewController,
logzmetricstarget.NewController,
splunktarget.NewController,
// flow
jqtransformation.NewController,
synchronizer.NewController,
transformation.NewController,
xmltojsontransformation.NewController,
xslttransformation.NewController,
// extensions
function.NewController,
// routing
filter.NewController,
splitter.NewController,
)
}
24 changes: 24 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ module github.com/zeiss/typhoon
go 1.21.6

require (
github.com/Shopify/sarama v1.30.0
github.com/ZachtimusPrime/Go-Splunk-HTTP/splunk/v2 v2.0.2
github.com/basgys/goxml2json v1.1.0
github.com/cloudevents/sdk-go/v2 v2.13.0
github.com/fsnotify/fsnotify v1.7.0
github.com/getkin/kin-openapi v0.123.0
Expand All @@ -12,14 +14,18 @@ require (
github.com/golangci/golangci-lint v1.55.2
github.com/google/cel-go v0.17.7
github.com/google/uuid v1.6.0
github.com/itchyny/gojq v0.12.14
github.com/katallaxie/pkg v0.5.12
github.com/kelseyhightower/envconfig v1.4.0
github.com/logzio/logzio-go v1.0.6
github.com/oapi-codegen/fiber-middleware v1.0.1
github.com/oapi-codegen/runtime v1.1.1
github.com/sethvargo/go-limiter v0.7.2
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
github.com/tidwall/gjson v1.17.1
github.com/wamuir/go-xslt v0.1.5
github.com/xdg-go/scram v1.0.2
go.opencensus.io v0.24.0
go.uber.org/zap v1.26.0
golang.org/x/oauth2 v0.17.0
Expand Down Expand Up @@ -64,7 +70,9 @@ require (
github.com/ashanbrown/makezero v1.1.1 // indirect
github.com/beeker1121/goque v2.1.0+incompatible // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bitly/go-simplejson v0.5.1 // indirect
github.com/bkielbasa/cyclop v1.2.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/blizzy78/varnamelen v0.8.0 // indirect
github.com/bombsimon/wsl/v3 v3.4.0 // indirect
Expand All @@ -83,6 +91,9 @@ require (
github.com/daixiang0/gci v0.11.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.4.3 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
Expand Down Expand Up @@ -139,16 +150,23 @@ require (
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.6.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/yaml v0.2.0 // indirect
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.4.3 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jgautheron/goconst v1.6.0 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
Expand Down Expand Up @@ -198,6 +216,7 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.4.5 // indirect
Expand All @@ -211,6 +230,7 @@ require (
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rickb777/date v1.13.0 // indirect
github.com/rickb777/plural v1.2.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
Expand Down Expand Up @@ -254,6 +274,8 @@ require (
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.51.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/stringprep v1.0.2 // indirect
github.com/xen0n/gosmopolitan v1.2.2 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
Expand All @@ -263,6 +285,7 @@ require (
go-simpler.org/sloglint v0.1.2 // indirect
go.tmz.dev/musttag v0.7.2 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/goleak v1.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
Expand All @@ -286,6 +309,7 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.4.6 // indirect
k8s.io/apiextensions-apiserver v0.28.5 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
Expand Down
Loading

0 comments on commit 913a7b1

Please sign in to comment.