Skip to content

Commit

Permalink
Allocate subchannel for new client
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuntao Lu committed Apr 3, 2017
1 parent be64aa8 commit 1faa5ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/example-gateway/clients/baz/baz.go
Expand Up @@ -28,13 +28,13 @@ func NewClient(config *zanzibar.StaticConfig, gateway *zanzibar.Gateway) *BazCli
// TODO: (lu) get serviceName from thrift
serviceName := "SimpleService"

ch := gateway.Channel
sc := gateway.Channel.GetSubChannel(serviceName)

ip := config.MustGetString("clients.baz.ip")
port := config.MustGetInt("clients.baz.port")
ch.Peers().Add(ip + ":" + strconv.Itoa(int(port)))
sc.Peers().Add(ip + ":" + strconv.Itoa(int(port)))

client := zt.NewClient(ch, serviceName)
client := zt.NewClient(gateway.Channel, serviceName)

return &BazClient{
thriftService: serviceName,
Expand Down

0 comments on commit 1faa5ab

Please sign in to comment.