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