public static Metadata GetMeta(this GrpcConfig config) { if (string.IsNullOrEmpty(config.Authentication)) { return(null); } return(new Metadata { new Metadata.Entry("Authentication", config.Authentication) }); }
public static DateTime GetReportTimeout(this GrpcConfig config) { return(DateTime.UtcNow.AddMilliseconds(config.ReportTimeout)); }
public ConnectionManager(ILoggerFactory loggerFactory, IConfigAccessor configAccessor) { _logger = loggerFactory.CreateLogger(typeof(ConnectionManager)); _config = configAccessor.Get <GrpcConfig>(); }