Esempio n. 1
0
 public IEnumerable <HeartbeatView> GetAllHeartbeats(IHeartbeatMonitor heartbeatMonitor)
 {
     return(heartbeatMonitor.GetListOfHeartbeatServices().Select(x => new HeartbeatView {
         Source = x.Source,
         ElapsedSeconds = (int)(DateTime.UtcNow - x.DateTime).TotalSeconds
     }));
 }
Esempio n. 2
0
 public HeartbeatHealthCheck(
     ILogger <HeartbeatHealthCheck> logger,
     IOptions <HeartbeatHealthCheckOptions> heartbeatOptions,
     IHeartbeatMonitor heartbeatMonitor)
 {
     _logger           = logger;
     _heartbeatOptions = heartbeatOptions;
     _heartbeatMonitor = heartbeatMonitor;
 }
 public HeartbeatValidityMonitor(IHeartbeatMonitor innerMonitor, Cache cache)
 {
     _innerMonitor = innerMonitor;
     _cache = cache;
 }
Esempio n. 4
0
 public HeartbeatConsumer(ILogger <HeartbeatConsumer> logger, IHeartbeatMonitor heartbeatMonitor)
 {
     _logger           = logger;
     _heartbeatMonitor = heartbeatMonitor;
 }
Esempio n. 5
0
 public HeartbeatModule(IHeartbeatMonitor heartbeatMonitor)
 {
     Get ["/heartbeats/"] = parameters => GetAllHeartbeats(heartbeatMonitor);
 }
 public HeartbeatValidityMonitor(IHeartbeatMonitor innerMonitor, Cache cache)
 {
     _innerMonitor = innerMonitor;
     _cache        = cache;
 }