public IEnumerable <HeartbeatView> GetAllHeartbeats(IHeartbeatMonitor heartbeatMonitor) { return(heartbeatMonitor.GetListOfHeartbeatServices().Select(x => new HeartbeatView { Source = x.Source, ElapsedSeconds = (int)(DateTime.UtcNow - x.DateTime).TotalSeconds })); }
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; }
public HeartbeatConsumer(ILogger <HeartbeatConsumer> logger, IHeartbeatMonitor heartbeatMonitor) { _logger = logger; _heartbeatMonitor = heartbeatMonitor; }
public HeartbeatModule(IHeartbeatMonitor heartbeatMonitor) { Get ["/heartbeats/"] = parameters => GetAllHeartbeats(heartbeatMonitor); }