package service import ( "reflect" cda "git.loafle.net/commons_go/di/annotation" cdr "git.loafle.net/commons_go/di/registry" "git.loafle.net/overflow/overflow_probe_container_network/crawler/impl" ) func init() { cdr.RegisterType(reflect.TypeOf((*DataService)(nil))) } type DataService struct { cda.TypeAnnotation `annotation:"@overFlow:Service()"` } func (s *DataService) Get(crawlerName string, sensorID string) (interface{}, error) { c := impl.GetCrawler(crawlerName) return c.Get(sensorID) }