using ScadaLink.Commons.Messages.Health;
namespace ScadaLink.HealthMonitoring;
///
/// Interface for central-side health aggregation.
/// Consumed by Central UI to display site health dashboards.
///
public interface ICentralHealthAggregator
{
void ProcessReport(SiteHealthReport report);
///
/// Bumps the last-seen timestamp for a site already known via a prior
/// SiteHealthReport. Used to keep a site marked online between full
/// 30s reports when ~2s heartbeats are arriving — protects against the
/// 60s offline threshold firing on a transiently delayed report.
///
void MarkHeartbeat(string siteId, DateTimeOffset receivedAt);
IReadOnlyDictionary GetAllSiteStates();
SiteHealthState? GetSiteState(string siteId);
}