示例#1
0
        public OrderRpcService(IOptions <OrderRpcServcieSetting> setting, IHttpContextAccessor httpContext)
        {
            _setting = setting.Value;

            _channel = GrpcServiceHelper.CreateAuthenticatedChannel(_setting.OrderServcieHost, httpContext);
            _client  = new Orders.OrdersClient(_channel);
        }
示例#2
0
        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);
        }