probe/service/DataService.go
crusader ca823a2e69 ing
2018-05-03 20:24:07 +09:00

49 lines
849 B
Go

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
}