config package rework (#9)
* change config interface * reuse codec * allow to modify next config based on values in current config via BeforeLoad Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -2,6 +2,7 @@ package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/unistack-org/micro/v3/errors"
|
||||
@@ -18,6 +19,10 @@ func LookupRoute(ctx context.Context, req Request, opts CallOptions) ([]string,
|
||||
return opts.Address, nil
|
||||
}
|
||||
|
||||
if opts.Router == nil {
|
||||
return nil, router.ErrRouteNotFound
|
||||
}
|
||||
|
||||
// construct the router query
|
||||
query := []router.QueryOption{router.QueryService(req.Service())}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user