private kubemqClient CreateNewClient() { Channel channel; string kubemqAddress = GetKubeMQAddress(); string clientCertFile = ConfigurationLoader.GetCertificateFile(); List <ChannelOption> options = new List <ChannelOption>(); options.Add(new ChannelOption("grpc.max_receive_message_length", 1024 * 1024 * 1024)); if (!string.IsNullOrWhiteSpace(clientCertFile)) { // Open SSL/TLS connection var channelCredentials = new SslCredentials(File.ReadAllText(clientCertFile)); channel = new Channel(kubemqAddress, channelCredentials, options); } else { // Open Insecure connection channel = new Channel(kubemqAddress, ChannelCredentials.Insecure, options); } _client = new kubemqClient(channel); //logger.LogTrace("Opened connection to KubeMQ server (ip:port) {0}", kubemqAddress); return(_client); }
private kubemqClient CreateNewClient() { Channel channel; string kubemqAddress = GetKubeMQAddress(); string clientCertFile = ConfigurationLoader.GetCertificateFile(); if (!string.IsNullOrWhiteSpace(clientCertFile)) { // Open SSL/TLS connection var channelCredentials = new SslCredentials(File.ReadAllText(clientCertFile)); channel = new Channel(kubemqAddress, channelCredentials); } else { // Open Insecure connection channel = new Channel(kubemqAddress, ChannelCredentials.Insecure); } _client = new kubemqClient(channel); //logger.LogTrace("Opened connection to KubeMQ server (ip:port) {0}", kubemqAddress); return(_client); }
protected kubemqClient GetWarpGrpcClient() { if (_client != null) { return(_client); } // Open connection string warpAddress = GetWarpAddress(); var channel = new Channel(warpAddress, ChannelCredentials.Insecure); _client = new kubemqClient(channel); //logger.LogDebug("Sender: Opened connection to KubeMQ server (ip:port) {0}", tbusAddress); return(_client); }