1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-24 22:26:54 +02:00

Use Server ID in account name

This commit is contained in:
Ben Toogood
2020-04-29 15:27:18 +01:00
parent ef9f65c78b
commit f48dec1fb0
2 changed files with 7 additions and 4 deletions

View File

@ -41,7 +41,7 @@ func newService(opts ...Option) Service {
// wrap client to inject From-Service header on any calls
options.Client = wrapper.FromService(serviceName, options.Client)
options.Client = wrapper.TraceCall(serviceName, trace.DefaultTracer, options.Client)
options.Client = wrapper.AuthClient(serviceName, authFn, options.Client)
options.Client = wrapper.AuthClient(serviceName, options.Server.Options().Id, authFn, options.Client)
// wrap the server to provide handler stats
options.Server.Init(