client: add select options (#1786)

This commit is contained in:
ben-toogood 2020-07-02 17:03:08 +01:00 committed by Vasiliy Tolstov
parent 422fd980e9
commit fa9c531ad9

View File

@ -114,7 +114,7 @@ func (g *grpcClient) lookupRoute(req client.Request, opts client.CallOptions) (*
} }
// select the route to use for the request // select the route to use for the request
if route, err := opts.Selector.Select(routes); err == selector.ErrNoneAvailable { if route, err := opts.Selector.Select(routes, opts.SelectOptions...); err == selector.ErrNoneAvailable {
return nil, errors.InternalServerError("go.micro.client", "service %s: %s", req.Service(), err.Error()) return nil, errors.InternalServerError("go.micro.client", "service %s: %s", req.Service(), err.Error())
} else if err != nil { } else if err != nil {
return nil, errors.InternalServerError("go.micro.client", "error getting next %s node: %s", req.Service(), err.Error()) return nil, errors.InternalServerError("go.micro.client", "error getting next %s node: %s", req.Service(), err.Error())