From 30a0bfeeb81f75099dfb6cd0366691a135d9ff32 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 26 Jun 2019 20:51:13 +0100 Subject: [PATCH] Accept a range of addresses --- grpc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc.go b/grpc.go index 3430fbf..df4163c 100644 --- a/grpc.go +++ b/grpc.go @@ -59,14 +59,14 @@ func (g *grpcClient) next(request client.Request, opts client.CallOptions) (sele // get proxy address if prx := os.Getenv("MICRO_PROXY_ADDRESS"); len(prx) > 0 { - opts.Address = prx + opts.Address = []string{prx} } // return remote address if len(opts.Address) > 0 { return func() (*registry.Node, error) { return ®istry.Node{ - Address: opts.Address, + Address: opts.Address[0], }, nil }, nil }