dengbiao 1 week ago
parent
commit
ee80badce9
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      pkg/rpc/rpc.go

+ 3
- 3
pkg/rpc/rpc.go View File

@@ -58,10 +58,10 @@ func initConnectIntClient() {
}

func initBusinessIntClient() {
conn, err := grpc.DialContext(context.TODO(), "127.0.0.1:8000", grpc.WithInsecure(),
grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)))
//conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg-im", "business", "8000"), grpc.WithInsecure(),
//conn, err := grpc.DialContext(context.TODO(), "127.0.0.1:8000", grpc.WithInsecure(),
// grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)))
conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg-im", "business", "8000"), grpc.WithInsecure(),
grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)))
if err != nil {
panic(err)
}


Loading…
Cancel
Save