probe/service/DataService.go

49 lines
849 B
Go
Raw Normal View History

2018-05-03 11:24:07 +00:00
package service
import (
"reflect"
cda "git.loafle.net/commons/di-go/annotation"
cdr "git.loafle.net/commons/di-go/registry"
logging "git.loafle.net/commons/logging-go"
// For annotation
_ "git.loafle.net/overflow/commons-go/core/annotation"
)
var DataServiceType = reflect.TypeOf((*DataService)(nil))
func init() {
cdr.RegisterType(DataServiceType)
}
type DataService struct {
cda.TypeAnnotation `annotation:"@overflow:RPCService()"`
DataClientService *DataClientService `annotation:"@Inject()"`
}
func (s *DataService) InitService() error {
return nil
}
func (s *DataService) StartService() error {
return nil
}
func (s *DataService) StopService() {
}
func (s *DataService) DestroyService() {
}
func (s *DataService) Metric(metric map[string]string) error {
logging.Logger().Debugf("Metric: %v", metric)
return nil
}