Example #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)
     });
 }
Example #2
0
 public ConnectionManager(ILoggerFactory loggerFactory, IConfigAccessor configAccessor)
 {
     _logger = loggerFactory.CreateLogger(typeof(ConnectionManager));
     _config = configAccessor.Get <GrpcConfig>();
 }
Example #3
0
 public static DateTime GetReportTimeout(this GrpcConfig config)
 {
     return(DateTime.UtcNow.AddMilliseconds(config.ReportTimeout));
 }