main
kzkzzzz 2025-12-11 22:20:19 +08:00
parent 22ba1c8046
commit bd62ff8235
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package consul
import (
"fmt"
"git.makemake.in/kzkzzzz/mycommon/myconf"
"git.makemake.in/kzkzzzz/mycommon/mygrpc"
"git.makemake.in/kzkzzzz/mycommon/myregistry"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/api/watch"
@ -177,7 +178,7 @@ func (c *Consul) Client() *api.Client {
}
func GrpcUrl(serviceName string, conf *myconf.Config) string {
return GrpcUrlWithTag("", "grpc-"+serviceName, conf)
return GrpcUrlWithTag("", mygrpc.ServicePrefix+serviceName, conf)
}
func GrpcUrlWithTag(tag string, serviceName string, conf *myconf.Config) string {