default to noop registry in network

This commit is contained in:
Asim Aslam 2020-08-14 21:52:05 +01:00
parent 374aae1490
commit 58794df27c

View File

@ -19,6 +19,7 @@ import (
pb "github.com/micro/go-micro/v3/network/mucp/proto" pb "github.com/micro/go-micro/v3/network/mucp/proto"
"github.com/micro/go-micro/v3/network/resolver/dns" "github.com/micro/go-micro/v3/network/resolver/dns"
"github.com/micro/go-micro/v3/proxy" "github.com/micro/go-micro/v3/proxy"
"github.com/micro/go-micro/v3/registry/noop"
"github.com/micro/go-micro/v3/router" "github.com/micro/go-micro/v3/router"
"github.com/micro/go-micro/v3/server" "github.com/micro/go-micro/v3/server"
smucp "github.com/micro/go-micro/v3/server/mucp" smucp "github.com/micro/go-micro/v3/server/mucp"
@ -156,6 +157,7 @@ func NewNetwork(opts ...network.Option) network.Network {
) )
// server is network server // server is network server
// TODO: use the real registry
server := smucp.NewServer( server := smucp.NewServer(
server.Id(options.Id), server.Id(options.Id),
server.Address(peerAddress), server.Address(peerAddress),
@ -163,6 +165,7 @@ func NewNetwork(opts ...network.Option) network.Network {
server.Name(options.Name), server.Name(options.Name),
server.Transport(tunTransport), server.Transport(tunTransport),
server.Broker(tunBroker), server.Broker(tunBroker),
server.Registry(noop.NewRegistry()),
) )
// client is network client // client is network client