MCPcopy Create free account
hub / github.com/deepflowio/deepflow / startKubernetesGatherTask

Method startKubernetesGatherTask

server/controller/cloud/cloud.go:431–448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

429}
430
431func (c *Cloud) startKubernetesGatherTask() {
432 log.Infof("cloud (%s) kubernetes gather task started", c.basicInfo.Name, logger.NewORGPrefix(c.orgID))
433 c.runKubernetesGatherTask()
434 ticker := time.NewTicker(time.Duration(c.cfg.KubernetesGatherInterval) * time.Second)
435 go func() {
436 defer ticker.Stop()
437
438 for {
439 select {
440 case <-c.cCtx.Done():
441 log.Infof("cloud (%s) kubernetes gather task stopped", c.basicInfo.Name, logger.NewORGPrefix(c.orgID))
442 return
443 case <-ticker.C:
444 c.runKubernetesGatherTask()
445 }
446 }
447 }()
448}
449
450func (c *Cloud) runKubernetesGatherTask() {
451 var domain metadbmodel.Domain

Callers 1

StartMethod · 0.95

Calls 3

StopMethod · 0.65
InfofMethod · 0.45

Tested by

no test coverage detected