client: add select options (#1786)
This commit is contained in:
@@ -60,6 +60,8 @@ type CallOptions struct {
|
||||
Router router.Router
|
||||
// Selector to use for the call
|
||||
Selector selector.Selector
|
||||
// SelectOptions to use when selecting a route
|
||||
SelectOptions []selector.SelectOption
|
||||
// Stream timeout for the stream
|
||||
StreamTimeout time.Duration
|
||||
// Use the services own auth token
|
||||
@@ -360,6 +362,13 @@ func WithSelector(s selector.Selector) CallOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithSelectOptions sets the options to pass to the selector for this call
|
||||
func WithSelectOptions(sops ...selector.SelectOption) CallOption {
|
||||
return func(o *CallOptions) {
|
||||
o.SelectOptions = sops
|
||||
}
|
||||
}
|
||||
|
||||
func WithMessageContentType(ct string) MessageOption {
|
||||
return func(o *MessageOptions) {
|
||||
o.ContentType = ct
|
||||
|
||||
Reference in New Issue
Block a user