public HomeController(ILogger <HomeController> logger) { _logger = logger; var channel = GrpcChannel.ForAddress("https://localhost:5001"); _client = new Products.ProductsClient(channel); }
public ProductRpcService(IOptions <OrderRpcServcieSetting> setting, IHttpContextAccessor httpContext) { _setting = setting.Value; _httpContext = httpContext; // GrpcChannel.ForAddress(_setting.OrderServcieHost); _channel = GrpcServiceHelper.CreateAuthenticatedChannel(_setting.OrderServcieHost, httpContext); _client = new Products.ProductsClient(_channel); }