using OpenHarbor.MCP.Gateway.Core.Models;
namespace OpenHarbor.MCP.Gateway.Core.Interfaces;
///
/// Defines the contract for health checking servers.
/// Supports both active (periodic) and on-demand health checks.
///
public interface IHealthChecker
{
///
/// Performs a single health check on the specified server.
///
/// Server configuration to check
/// Cancellation token
/// Health status of the server
Task CheckHealthAsync(ServerConfig serverConfig, CancellationToken cancellationToken = default);
///
/// Starts monitoring the specified servers with periodic health checks.
///
/// List of servers to monitor
/// Cancellation token
Task StartMonitoringAsync(IEnumerable serverConfigs, CancellationToken cancellationToken = default);
///
/// Stops all active health monitoring.
///
/// Cancellation token
Task StopMonitoringAsync(CancellationToken cancellationToken = default);
///
/// Gets the current health status of all monitored servers.
///
/// Cancellation token
/// Collection of server health statuses
Task> GetCurrentHealthAsync(CancellationToken cancellationToken = default);
}