Remove Port from registry
This commit is contained in:
parent
dfffa16590
commit
df9fa0c938
6
grpc.go
6
grpc.go
@ -534,8 +534,7 @@ func (g *grpcServer) Register() error {
|
|||||||
// register service
|
// register service
|
||||||
node := ®istry.Node{
|
node := ®istry.Node{
|
||||||
Id: config.Name + "-" + config.Id,
|
Id: config.Name + "-" + config.Id,
|
||||||
Address: addr,
|
Address: fmt.Sprintf("%s:%d", addr, port),
|
||||||
Port: port,
|
|
||||||
Metadata: config.Metadata,
|
Metadata: config.Metadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,8 +657,7 @@ func (g *grpcServer) Deregister() error {
|
|||||||
|
|
||||||
node := ®istry.Node{
|
node := ®istry.Node{
|
||||||
Id: config.Name + "-" + config.Id,
|
Id: config.Name + "-" + config.Id,
|
||||||
Address: addr,
|
Address: fmt.Sprintf("%s:%d", addr, port),
|
||||||
Port: port,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
service := ®istry.Service{
|
service := ®istry.Service{
|
||||||
|
Loading…
Reference in New Issue
Block a user