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

Embedded NATS Broker (#1110)

* if the address is produced by a default route don't hash it

* embedded nats

* fix url parsing

* don't override help

* add ready flag
This commit is contained in:
Asim Aslam
2020-01-14 13:23:16 +00:00
committed by GitHub
parent b699d969e4
commit 1d311ab457
10 changed files with 308 additions and 41 deletions

View File

@@ -1,17 +1,24 @@
package micro
import (
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/server"
"github.com/micro/go-micro/store"
// set defaults
"github.com/micro/go-micro/broker/nats"
gcli "github.com/micro/go-micro/client/grpc"
gsrv "github.com/micro/go-micro/server/grpc"
memStore "github.com/micro/go-micro/store/memory"
)
func init() {
// default broker
broker.DefaultBroker = nats.NewBroker(
// embedded nats server
nats.LocalServer(),
)
// default client
client.DefaultClient = gcli.NewClient()
// default server