Shift embedded nats to the default

This commit is contained in:
Asim Aslam
2020-01-19 00:55:01 +00:00
parent 105596a0e5
commit 11b104677a
11 changed files with 1265 additions and 823 deletions

View File

@@ -1,28 +1,17 @@
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(),
)
// new client initialisation
client.NewClient = gcli.NewClient
// new server initialisation
server.NewServer = gsrv.NewServer
// default client
client.DefaultClient = gcli.NewClient()
// default server