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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user