29 lines
502 B
Go
29 lines
502 B
Go
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
|
|
}
|