server: register in the services namespace (#1718)
This commit is contained in:
parent
f815eed7fd
commit
c58690b414
8
grpc.go
8
grpc.go
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user