I registered my gRPC services into local Eureka Service registery with no problem.
but I don know how to use it for clients that want to call these services.
this is my code when I want to call gRPC service
var config = new EurekaClientConfig
{
ShouldFetchRegistry = true,
ShouldRegisterWithEureka = false,
ValidateCertificates = false,
EurekaServerServiceUrls = EurekaClientConfig.Default_ServerServiceUrl,
};
// this is where i don't know how to configure discovery client
var client = new EurekaDiscoveryClient(null, null, null);
var discoveryHandler = new DiscoveryHttpClientHandler(client);
var channel = GrpcChannel.ForAddress("http://userservice/", new GrpcChannelOptions { HttpHandler = discoveryHandler });
question from:
https://stackoverflow.com/questions/65679896/steeltoe-eureka-with-net-core-grpc 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…