overflow_probes/service/CollectorService.go

44 lines
996 B
Go
Raw Normal View History

2018-03-26 15:14:19 +00:00
package service
import (
"context"
"reflect"
cda "git.loafle.net/commons_go/di/annotation"
cdr "git.loafle.net/commons_go/di/registry"
oocmci "git.loafle.net/overflow/overflow_commons_go/modules/commons/interfaces"
"git.loafle.net/overflow/overflow_probes/commons/scheduler"
)
func init() {
cdr.RegisterType(reflect.TypeOf((*CollectorService)(nil)))
}
type CollectorService struct {
cda.TypeAnnotation `annotation:"@overFlow:Service()"`
oocmci.Service
SensorConfigService *SensorConfigService `annotation:"@Inject()"`
ContainerService *ContainerService `annotation:"@Inject()"`
CentralService *CentralService `annotation:"@Inject()"`
crawlingScheduler scheduler.Scheduler
}
func (cs *CollectorService) Start() error {
// cs.crawlingScheduler = scheduler.NewScheduler()
// cs.crawlingScheduler.Every(1).Second().Do(cs.test)
return nil
}
func (cs *CollectorService) Stop(ctx context.Context) error {
return nil
}
func (cs *CollectorService) test() {
}