Interface IHealthChecker
- Namespace
- AppHealthMonitor
- Assembly
- AppHealthMonitor.dll
Defines a contract for checking the health of a specific port type. Implementations should handle their own timeout and cleanup logic.
public interface IHealthChecker
Properties
PortType
Gets the port type this health checker handles.
PortType PortType { get; }
Property Value
Methods
IsResponsiveAsync(string, int, int, CancellationToken)
Checks if the specified port is responsive.
Task<bool> IsResponsiveAsync(string host, int port, int timeoutMilliseconds, CancellationToken cancellationToken)
Parameters
hoststringThe hostname or IP address to check.
portintThe port number to check.
timeoutMillisecondsintThe timeout in milliseconds before the check is considered failed.
cancellationTokenCancellationTokenToken to signal cancellation of the check.