overflow_discovery/client/rpc/client_handlers.go

29 lines
502 B
Go
Raw Normal View History

2017-10-31 10:27:26 +00:00
package rpc
import (
"git.loafle.net/commons_go/rpc"
rpcClient "git.loafle.net/commons_go/rpc/client"
"git.loafle.net/commons_go/rpc/protocol/json"
)
func NewClientHandler(registry rpc.Registry) *ClientHandlers {
ch := &ClientHandlers{}
ch.ContentType = "json"
ch.Codec = json.NewClientCodec()
ch.RPCRegistry = registry
return ch
}
type ClientHandlers struct {
rpcClient.ClientHandlers
}
func (ch *ClientHandlers) OnStart() {
// no op
}
func (ch *ClientHandlers) OnStop() {
// no op
}