mirror of
				https://github.com/go-micro/go-micro.git
				synced 2025-10-30 23:27:41 +02:00 
			
		
		
		
	minor tweak add log line to proxy and basic auth provider by default (#1513)
This commit is contained in:
		| @@ -2,6 +2,7 @@ package auth | ||||
|  | ||||
| import ( | ||||
| 	"github.com/google/uuid" | ||||
| 	"github.com/micro/go-micro/v2/auth/provider/basic" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| @@ -9,7 +10,17 @@ var ( | ||||
| ) | ||||
|  | ||||
| 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 { | ||||
|   | ||||
| @@ -206,7 +206,7 @@ func (p *Proxy) cacheRoutes(service string) ([]router.Route, error) { | ||||
| 	results, err := p.Router.Lookup(router.QueryService(service)) | ||||
| 	if err != nil { | ||||
| 		// assumption that we're ok with stale routes | ||||
|  | ||||
| 		logger.Debugf("Failed to lookup route for %s: %v", service, err) | ||||
| 		// otherwise return the error | ||||
| 		return nil, err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user