add option to set selector

This commit is contained in:
Asim Aslam 2017-12-20 21:43:24 +00:00
parent 11d75dae1b
commit b0b0338128

View File

@ -104,6 +104,13 @@ func Registry(r registry.Registry) Option {
} }
} }
// Selector sets the selector for the service client
func Selector(s selector.Selector) Option {
return func(o *Options) {
o.Client.Init(client.Selector(s))
}
}
// Transport sets the transport for the service // Transport sets the transport for the service
// and the underlying components // and the underlying components
func Transport(t transport.Transport) Option { func Transport(t transport.Transport) Option {