From 01f6683035362f055d6240d97926d29df2d757ab Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 13 Jan 2019 12:15:13 +0000 Subject: [PATCH] Add router option --- client/options.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/options.go b/client/options.go index aa65381e..dca251c6 100644 --- a/client/options.go +++ b/client/options.go @@ -22,6 +22,9 @@ type Options struct { Selector selector.Selector Transport transport.Transport + // Router sets the router + Router Router + // Connection Pool PoolSize int PoolTTL time.Duration @@ -306,3 +309,10 @@ func StreamingRequest() RequestOption { o.Stream = true } } + +// WithRouter sets the client router +func WithRouter(r Router) Option { + return func(o *Options) { + o.Router = r + } +}