1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-29 21:47:44 +02:00

Broker init

This commit is contained in:
Asim
2016-03-15 22:12:28 +00:00
parent fe4362be5a
commit 64220dc0c5
7 changed files with 21 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ type Options struct {
Client *client.Client
Server *server.Server
Brokers map[string]func([]string, ...broker.Option) broker.Broker
Brokers map[string]func(...broker.Option) broker.Broker
Registries map[string]func([]string, ...registry.Option) registry.Registry
Selectors map[string]func(...selector.Option) selector.Selector
Transports map[string]func([]string, ...transport.Option) transport.Transport
@@ -93,7 +93,7 @@ func Server(s *server.Server) Option {
}
// New broker func
func NewBroker(name string, b func([]string, ...broker.Option) broker.Broker) Option {
func NewBroker(name string, b func(...broker.Option) broker.Broker) Option {
return func(o *Options) {
o.Brokers[name] = b
}