From a8a298aba3418d0884bc0aac25093d4a83bea368 Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 3 Jul 2018 00:19:56 +0900 Subject: [PATCH] ing --- client/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/client.go b/client/client.go index 71efe65..40a1899 100644 --- a/client/client.go +++ b/client/client.go @@ -4,6 +4,7 @@ import ( cdr "git.loafle.net/commons/di-go/registry" "git.loafle.net/commons/logging-go" crc "git.loafle.net/commons/rpc-go/client" + crcodec "git.loafle.net/commons/rpc-go/codec" crpj "git.loafle.net/commons/rpc-go/protocol/json" crr "git.loafle.net/commons/rpc-go/registry" occp "git.loafle.net/overflow/commons-go/config/probe" @@ -15,13 +16,13 @@ import ( ) func New(portNumber int) *crc.Client { - rpcClientCodec := crpj.NewClientCodec() - connector, err := occ.NewConnector(occp.ContainerDiscovery, portNumber) if nil != err { logging.Logger().Panic(err) } + rpcClientCodec := crpj.NewCustomClientCodec(crcodec.NewCompressionCodecSelector(connector.GetCompressionThreshold())) + ch := &ClientHandlers{} ch.Name = occp.ContainerDiscovery.String() ch.Connector = connector