Skip to content

Commit

Permalink
normalise proxy name (micro#1203)
Browse files Browse the repository at this point in the history
  • Loading branch information
asim authored Feb 15, 2020
1 parent fc5339a commit b3fc8be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func (g *grpcClient) next(request client.Request, opts client.CallOptions) (sele

// get proxy
if prx := os.Getenv("MICRO_PROXY"); len(prx) > 0 {
// default name
if prx == "service" {
prx = "go.micro.proxy"
}
service = prx
}

Expand Down
4 changes: 4 additions & 0 deletions client/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ func (r *rpcClient) next(request Request, opts CallOptions) (selector.Next, erro

// get proxy
if prx := os.Getenv("MICRO_PROXY"); len(prx) > 0 {
// default name
if prx == "service" {
prx = "go.micro.proxy"
}
service = prx
}

Expand Down

0 comments on commit b3fc8be

Please sign in to comment.