2017-10-31 19:27:26 +09:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
2017-11-30 19:16:55 +09:00
|
|
|
crc "git.loafle.net/commons_go/rpc/client"
|
2017-11-01 15:47:59 +09:00
|
|
|
"git.loafle.net/commons_go/rpc/protocol/json"
|
2017-12-01 17:29:54 +09:00
|
|
|
crr "git.loafle.net/commons_go/rpc/registry"
|
2017-10-31 19:27:26 +09:00
|
|
|
)
|
|
|
|
|
2017-12-01 17:29:54 +09:00
|
|
|
func NewClientHandler(rpcInvoker crr.RPCInvoker) ClientHandler {
|
2017-10-31 19:27:26 +09:00
|
|
|
ch := &ClientHandlers{}
|
2017-12-01 17:29:54 +09:00
|
|
|
ch.RPCInvoker = rpcInvoker
|
2017-11-01 15:47:59 +09:00
|
|
|
ch.Codec = json.NewClientCodec()
|
2017-10-31 19:27:26 +09:00
|
|
|
|
|
|
|
return ch
|
|
|
|
}
|
|
|
|
|
|
|
|
type ClientHandlers struct {
|
2017-11-30 19:16:55 +09:00
|
|
|
crc.ClientHandlers
|
2017-10-31 19:27:26 +09:00
|
|
|
}
|