server: register in the services namespace (#1718)

This commit is contained in:
ben-toogood 2020-06-19 09:24:32 +01:00 committed by Vasiliy Tolstov
parent f815eed7fd
commit c58690b414

View File

@ -576,8 +576,12 @@ func (g *grpcServer) Register() error {
var regErr error var regErr error
for i := 0; i < 3; i++ { for i := 0; i < 3; i++ {
// set the ttl // set the ttl and namespace
rOpts := []registry.RegisterOption{registry.RegisterTTL(config.RegisterTTL)} rOpts := []registry.RegisterOption{
registry.RegisterTTL(config.RegisterTTL),
registry.RegisterDomain(g.opts.Namespace),
}
// attempt to register // attempt to register
if err := config.Registry.Register(service, rOpts...); err != nil { if err := config.Registry.Register(service, rOpts...); err != nil {
// set the error // set the error