2018-03-22 12:12:17 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
2018-03-27 07:37:39 +00:00
|
|
|
"context"
|
2018-03-22 12:12:17 +00:00
|
|
|
"reflect"
|
|
|
|
|
|
|
|
cda "git.loafle.net/commons_go/di/annotation"
|
|
|
|
cdr "git.loafle.net/commons_go/di/registry"
|
|
|
|
cr "git.loafle.net/commons_go/rpc"
|
2018-03-27 07:37:39 +00:00
|
|
|
oocmci "git.loafle.net/overflow/overflow_commons_go/modules/commons/interfaces"
|
2018-03-22 12:12:17 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
cdr.RegisterType(reflect.TypeOf((*ProbeService)(nil)))
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProbeService struct {
|
|
|
|
cda.TypeAnnotation `annotation:"@overFlow:Service()"`
|
2018-03-27 07:37:39 +00:00
|
|
|
oocmci.Service
|
2018-03-22 12:12:17 +00:00
|
|
|
|
|
|
|
RPCServlet cr.Servlet
|
|
|
|
}
|
|
|
|
|
2018-03-27 07:37:39 +00:00
|
|
|
func (ps *ProbeService) Start() error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ps *ProbeService) Stop(ctx context.Context) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-03-22 12:12:17 +00:00
|
|
|
func (ps *ProbeService) Send(method string, params ...interface{}) error {
|
|
|
|
return ps.RPCServlet.Send(method, params...)
|
|
|
|
}
|