minor tweak add log line to proxy and basic auth provider by default (#1513)
This commit is contained in:
parent
bf65dc71c7
commit
29cccd0b4a
@ -2,6 +2,7 @@ package auth
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
"github.com/micro/go-micro/v2/auth/provider/basic"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -9,7 +10,17 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func NewAuth(opts ...Option) Auth {
|
func NewAuth(opts ...Option) Auth {
|
||||||
return &noop{}
|
options := Options{
|
||||||
|
Provider: basic.NewProvider(),
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, o := range opts {
|
||||||
|
o(&options)
|
||||||
|
}
|
||||||
|
|
||||||
|
return &noop{
|
||||||
|
opts: options,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type noop struct {
|
type noop struct {
|
||||||
|
@ -206,7 +206,7 @@ func (p *Proxy) cacheRoutes(service string) ([]router.Route, error) {
|
|||||||
results, err := p.Router.Lookup(router.QueryService(service))
|
results, err := p.Router.Lookup(router.QueryService(service))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// assumption that we're ok with stale routes
|
// assumption that we're ok with stale routes
|
||||||
|
logger.Debugf("Failed to lookup route for %s: %v", service, err)
|
||||||
// otherwise return the error
|
// otherwise return the error
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user