From c58690b4144c0884c1e9ad914901cb5b5a2d662f Mon Sep 17 00:00:00 2001 From: ben-toogood Date: Fri, 19 Jun 2020 09:24:32 +0100 Subject: [PATCH] server: register in the services namespace (#1718) --- grpc.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/grpc.go b/grpc.go index 1123fba..4dbc68e 100644 --- a/grpc.go +++ b/grpc.go @@ -576,8 +576,12 @@ func (g *grpcServer) Register() error { var regErr error for i := 0; i < 3; i++ { - // set the ttl - rOpts := []registry.RegisterOption{registry.RegisterTTL(config.RegisterTTL)} + // set the ttl and namespace + rOpts := []registry.RegisterOption{ + registry.RegisterTTL(config.RegisterTTL), + registry.RegisterDomain(g.opts.Namespace), + } + // attempt to register if err := config.Registry.Register(service, rOpts...); err != nil { // set the error