Transport init
This commit is contained in:
@@ -28,7 +28,7 @@ type Options struct {
|
||||
Brokers map[string]func(...broker.Option) broker.Broker
|
||||
Registries map[string]func(...registry.Option) registry.Registry
|
||||
Selectors map[string]func(...selector.Option) selector.Selector
|
||||
Transports map[string]func([]string, ...transport.Option) transport.Transport
|
||||
Transports map[string]func(...transport.Option) transport.Transport
|
||||
|
||||
// Other options for implementations of the interface
|
||||
// can be stored in a context
|
||||
@@ -114,7 +114,7 @@ func NewSelector(name string, s func(...selector.Option) selector.Selector) Opti
|
||||
}
|
||||
|
||||
// New transport func
|
||||
func NewTransport(name string, t func([]string, ...transport.Option) transport.Transport) Option {
|
||||
func NewTransport(name string, t func(...transport.Option) transport.Transport) Option {
|
||||
return func(o *Options) {
|
||||
o.Transports[name] = t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user