overflow_probe_container/client/client.go
crusader 11734b2eb5 ing
2017-12-15 16:47:39 +09:00

20 lines
475 B
Go

package client
import (
crc "git.loafle.net/commons_go/rpc/client"
crcrs "git.loafle.net/commons_go/rpc/client/rwc/socket"
crr "git.loafle.net/commons_go/rpc/registry"
)
func New(addr string, rpcInvoker crr.RPCInvoker) crc.Client {
clientHandler := newClientHandler(rpcInvoker)
socketHandler := newSocketHandler()
socketBuilder := NewSocketBuilder(addr, socketHandler)
cRWCHandler := crcrs.New(socketBuilder)
c := crc.New(clientHandler, cRWCHandler)
return c
}