Closed wgngoo closed 1 year ago
i also want‘t to know
sink应该是数组,亲测多个sink好使
可以看下初始化这一段代码: kube-eventer/eventer.go
var (
argFrequency = flag.Duration("frequency", 30*time.Second, "The resolution at which Eventer pushes events to sinks")
argMaxProcs = flag.Int("max_procs", 0, "max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores)")
argSources flags.Uris
argSinks flags.Uris
argVersion bool
argEventMetrics bool
argHealthzIP = flag.String("healthz-ip", "0.0.0.0", "ip eventer health check service uses")
argHealthzPort = flag.Uint("healthz-port", 8084, "port eventer health check listens on")
)
flag.Var(&argSources, "source", "source(s) to read events from")
flag.Var(&argSinks, "sink", "external sink(s) that receive events")
flag.BoolVar(&argVersion, "version", false, "print version info and exit")
flag.BoolVar(&argEventMetrics, "event-metrics", true, "whether to collect and export event metrics")
flag.Parse()
uri都是slice,所以是可以添加多个source和sinks
.e.g,dingtalk sink demo