Custom micro client

This commit is contained in:
Ben Toogood
2020-05-14 11:25:19 +01:00
parent 5764519f5b
commit 1b18730d54
4 changed files with 29 additions and 26 deletions

View File

@@ -43,7 +43,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, options.Server.Options().Id, authFn, options.Client)
options.Client = wrapper.AuthClient(authFn, options.Client)
// wrap the server to provide handler stats
options.Server.Init(