Namespace AppHealthMonitor
Classes
- AppConfig
Represents the configuration for a single application to be monitored. This structure mirrors the expected JSON configuration in appsettings.json.
- CommandHandler
Handles console command input and execution for the daemon. Provides commands for starting, stopping, restarting, querying status, and shutting down monitored applications.
- ConsoleCommand
Represents a console command that can be executed by the daemon. Encapsulates command name, description, and execution logic. Validates all parameters at construction time to fail fast on misconfiguration.
- DaemonControlPlane
Connects this daemon to the database-backed control plane: reports what it supervises, and executes the commands an operator queued for this host.
- DaemonOrchestrator
Orchestrates the lifecycle of application health monitors. Owns daemon-wide state (cancellation, start signal, active monitors) and pre-validates configurations at construction time.
- HealthCheckerFactory
Creates IHealthChecker instances for the specified port types. Returns an empty list when no port types are configured (process-only monitoring). Logs a warning when UDP is the only configured port type, as it provides no real health signal.
- HealthMonitor
Monitors the health and lifecycle of a single application process. Provides automatic restart capabilities, resource monitoring, and port health checks.
- HealthMonitorStatus
Immutable snapshot of a HealthMonitor's current state for diagnostics.
- PulseHealthChecker
Checks a FishMMO game server by reading the pulse it writes to the database.
- TcpHealthChecker
Checks port health by attempting to establish a TCP connection. Uses a linked cancellation token to enforce timeouts without leaking timers.
- TerminalProcessLauncher
Launches through a terminal without confusing its PID with the supervised app.
- UdpHealthChecker
Checks port health by attempting to send a UDP datagram.
Limitation: UDP is connectionless. A successful send only confirms the local OS accepted the datagram into the send buffer, not that the remote endpoint received it or is alive. This checker will report success even if the target application is down. For reliable health checking, prefer TCP, or DatabasePulse for a FishMMO game server. Use UDP only as a supplementary probe alongside other port types.
Interfaces
- IHealthChecker
Defines a contract for checking the health of a specific port type. Implementations should handle their own timeout and cleanup logic.
- ISupervisionHost
The seam through which a HealthMonitor whose monitoring loop has ended asks to be supervised again, without knowing anything about how the monitoring cycle is run.
- ISupervisionReservation
A held place in a running monitoring cycle. See TryReserveRevival(string, out string).
Enums
- PortType
The health checks an application can be configured with.