client: rename WithServiceToken => WithAuthToken (#1887)

This commit is contained in:
ben-toogood
2020-07-31 11:36:33 +01:00
committed by GitHub
parent 83a64797fb
commit 0b73d411ad
4 changed files with 68 additions and 843 deletions

View File

@@ -68,8 +68,8 @@ type CallOptions struct {
SelectOptions []selector.SelectOption
// Stream timeout for the stream
StreamTimeout time.Duration
// Use the services own auth token
ServiceToken bool
// Use the auth token as the authorization header
AuthToken bool
// Network to lookup the route within
Network string
@@ -336,11 +336,11 @@ func WithDialTimeout(d time.Duration) CallOption {
}
}
// WithServiceToken is a CallOption which overrides the
// WithAuthToken is a CallOption which overrides the
// authorization header with the services own auth token
func WithServiceToken() CallOption {
func WithAuthToken() CallOption {
return func(o *CallOptions) {
o.ServiceToken = true
o.AuthToken = true
}
}