2017-12-14 06:17:58 +00:00
|
|
|
package service
|
|
|
|
|
2018-03-26 02:58:39 +00:00
|
|
|
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)))
|
|
|
|
}
|
2017-12-14 06:17:58 +00:00
|
|
|
|
|
|
|
type DataService struct {
|
2018-03-26 02:58:39 +00:00
|
|
|
cda.TypeAnnotation `annotation:"@overFlow:Service()"`
|
2017-12-14 06:17:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *DataService) Get(crawlerName string, sensorID string) (interface{}, error) {
|
|
|
|
c := impl.GetCrawler(crawlerName)
|
|
|
|
return c.Get(sensorID)
|
|
|
|
}
|