INNER CODE UNIT · Go
WithClients
jaegertracing/jaeger-operator · pkg/autoclean/main.go:40
func WithClients(cl client.Client, dcl discovery.DiscoveryInterface, clr client.Reader) *Background {
return &Background{
cl: cl,
dcl: dcl,
clReader: clr,
}
}
// Start initializes the auto-clean process that runs in the background
func (b *Background) Start() {
b.ticker = time.NewTicker(5 * time.Second)
b.autoClean()
go func() {
for {
<-b.ticker.C
b.autoClean()
}