49 lines
849 B
Go
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
|
|
}
|