diff --git a/consul/consul.go b/consul/consul.go index d8bf42f..615d37e 100644 --- a/consul/consul.go +++ b/consul/consul.go @@ -123,9 +123,9 @@ func FindNode(servicename, tag string) (*consulapi.AgentService, error) { return services[r.Intn(l)%l].Service, nil } -//FindServer 从consul中发现服务,并返回grpc连接实例 -func FindServer(servicename string) (*grpc.ClientConn, error) { - node, err := FindNode(servicename, "") //无tag视为grpc服务 +//FindService 从consul中发现服务,并返回grpc连接实例 +func FindService(servicename, tag string) (*grpc.ClientConn, error) { + node, err := FindNode(servicename, tag) //无tag视为grpc服务 if err != nil { return nil, err }