46 lines
908 B
Go
46 lines
908 B
Go
package service
|
|
|
|
import (
|
|
"reflect"
|
|
|
|
cda "git.loafle.net/commons/di-go/annotation"
|
|
cdr "git.loafle.net/commons/di-go/registry"
|
|
crc "git.loafle.net/commons/rpc-go/client"
|
|
|
|
// For annotation
|
|
_ "git.loafle.net/overflow/commons-go/core/annotation"
|
|
)
|
|
|
|
var ProbeClientServiceType = reflect.TypeOf((*ProbeClientService)(nil))
|
|
|
|
func init() {
|
|
cdr.RegisterType(ProbeClientServiceType)
|
|
}
|
|
|
|
type ProbeClientService struct {
|
|
cda.TypeAnnotation `annotation:"@overflow:RPCService()"`
|
|
|
|
Client *crc.Client `annotation:"@Resource(name='CONTAINER_CLIENT')"`
|
|
}
|
|
|
|
func (s *ProbeClientService) InitService() error {
|
|
return nil
|
|
}
|
|
|
|
func (s *ProbeClientService) StartService() error {
|
|
|
|
return nil
|
|
}
|
|
|
|
func (s *ProbeClientService) StopService() {
|
|
|
|
}
|
|
|
|
func (s *ProbeClientService) DestroyService() {
|
|
|
|
}
|
|
|
|
func (s *ProbeClientService) Send(method string, params ...interface{}) error {
|
|
return s.Client.Send(method, params...)
|
|
}
|