Add router option
This commit is contained in:
@@ -22,6 +22,9 @@ type Options struct {
|
|||||||
Selector selector.Selector
|
Selector selector.Selector
|
||||||
Transport transport.Transport
|
Transport transport.Transport
|
||||||
|
|
||||||
|
// Router sets the router
|
||||||
|
Router Router
|
||||||
|
|
||||||
// Connection Pool
|
// Connection Pool
|
||||||
PoolSize int
|
PoolSize int
|
||||||
PoolTTL time.Duration
|
PoolTTL time.Duration
|
||||||
@@ -306,3 +309,10 @@ func StreamingRequest() RequestOption {
|
|||||||
o.Stream = true
|
o.Stream = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithRouter sets the client router
|
||||||
|
func WithRouter(r Router) Option {
|
||||||
|
return func(o *Options) {
|
||||||
|
o.Router = r
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user