go-kratos / kratos

Your ultimate Go microservices framework for the cloud-native era.
https://go-kratos.dev
MIT License
23.43k stars 4.01k forks source link

How to get the ip+port after load balancing? #3471

Closed nogolang closed 2 days ago

nogolang commented 1 week ago
grpcClient, err := grpc.DialInsecure(
    context.Background(),
    grpc.WithEndpoint("discovery:///user-service"),
    grpc.WithDiscovery(etcdRegister),

How to get the real ip+port after load balancing?

shenqidebaozi commented 2 days ago

selector.FromPeerContext

nogolang commented 2 days ago

thanks