selector: use custom domain (#1760)

* util/wrapper: improve auth errors

* client: add network call option

* client/selector: add domain select option

* client/grpc: pass network option to selector
This commit is contained in:
ben-toogood
2020-06-30 10:07:52 +01:00
committed by GitHub
parent deea8fecf4
commit 0f5c53b6e4
5 changed files with 42 additions and 7 deletions

View File

@@ -64,6 +64,8 @@ type CallOptions struct {
ServiceToken bool
// Duration to cache the response for
CacheExpiry time.Duration
// Network to lookup the route within
Network string
// Middleware for low level call func
CallWrappers []CallWrapper
@@ -338,6 +340,13 @@ func WithCache(c time.Duration) CallOption {
}
}
// WithNetwork is a CallOption which sets the network attribute
func WithNetwork(n string) CallOption {
return func(o *CallOptions) {
o.Network = n
}
}
func WithMessageContentType(ct string) MessageOption {
return func(o *MessageOptions) {
o.ContentType = ct