Example #1
0
        public GrpcServiceClient(GrpcSearchClient searchClient, GrpcChannel channel, GrpcChannelOptions options)
        {
            _options = new GrpcClientOptions
            {
                ChannelOptions = options,
                ServiceAddress = channel.Target
            };
            _searchClient = searchClient;
            _logger       = options?.LoggerFactory?.CreateLogger <GrpcServiceClient>() ?? NullLogger <GrpcServiceClient> .Instance;

            // we pin this object only to be able to shut it down properly later
            _channel = channel;
        }
Example #2
0
 public GrpcServiceClient(IOptions <GrpcClientOptions> options, ILogger <GrpcServiceClient> logger)
 {
     _options = options.Value;
     _logger  = logger;
 }