Add broker service to config/cmd

This commit is contained in:
Asim Aslam 2019-10-03 16:22:26 +01:00
parent 4de346920f
commit b80654bf7e

View File

@ -23,6 +23,7 @@ import (
"github.com/micro/go-micro/broker/http" "github.com/micro/go-micro/broker/http"
"github.com/micro/go-micro/broker/memory" "github.com/micro/go-micro/broker/memory"
"github.com/micro/go-micro/broker/nats" "github.com/micro/go-micro/broker/nats"
brokerSrv "github.com/micro/go-micro/broker/service"
// registries // registries
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
@ -179,9 +180,11 @@ var (
} }
DefaultBrokers = map[string]func(...broker.Option) broker.Broker{ DefaultBrokers = map[string]func(...broker.Option) broker.Broker{
"http": http.NewBroker, "go.micro.broker": brokerSrv.NewBroker,
"memory": memory.NewBroker, "service": brokerSrv.NewBroker,
"nats": nats.NewBroker, "http": http.NewBroker,
"memory": memory.NewBroker,
"nats": nats.NewBroker,
} }
DefaultClients = map[string]func(...client.Option) client.Client{ DefaultClients = map[string]func(...client.Option) client.Client{