overflow_discovery/client/client_handlers.go

20 lines
383 B
Go
Raw Normal View History

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