33 lines
675 B
Go
33 lines
675 B
Go
package client
|
|
|
|
import (
|
|
crc "git.loafle.net/commons_go/rpc/client"
|
|
"git.loafle.net/commons_go/rpc/protocol/json"
|
|
crr "git.loafle.net/commons_go/rpc/registry"
|
|
)
|
|
|
|
func newClientHandler(rpcInvoker crr.RPCInvoker) ClientHandler {
|
|
ch := &ClientHandlers{}
|
|
ch.RPCInvoker = rpcInvoker
|
|
ch.Codec = json.NewClientCodec()
|
|
|
|
return ch
|
|
}
|
|
|
|
type ClientHandlers struct {
|
|
crc.ClientHandlers
|
|
}
|
|
|
|
func (ch *ClientHandlers) Init(clientCTX crc.ClientContext) error {
|
|
|
|
return ch.ClientHandlers.Init(clientCTX)
|
|
}
|
|
|
|
func (ch *ClientHandlers) Destroy(clientCTX crc.ClientContext) {
|
|
ch.ClientHandlers.Destroy(clientCTX)
|
|
}
|
|
|
|
func (ch *ClientHandlers) Validate() {
|
|
ch.ClientHandlers.Validate()
|
|
}
|