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