Abstract Class: ConfigurableMonitorServiceBase<TType>
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:18
Shared base for monitor services that only need normalized config storage.
Hierarchy
Extended by
Type Parameters
TType
TType extends Site["monitors"][number]["type"]
Implements
Constructors
Constructor
protected new ConfigurableMonitorServiceBase<TType>(args: {
config?: Partial<MonitorServiceConfig>;
defaultTimeoutMs: number;
type: TType;
}): ConfigurableMonitorServiceBase<TType>;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:25
Parameters
args
config?
defaultTimeoutMs
number
type
TType
Returns
ConfigurableMonitorServiceBase<TType>
Properties
config
protected config: MonitorServiceConfig;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:21
type
private readonly type: TType;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:23
Methods
check()
abstract check(monitor: Monitor, signal?: AbortSignal): Promise<MonitorCheckResult>;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:37
Perform a health check on a monitor.
Parameters
monitor
The monitor configuration to check
signal?
Optional AbortSignal for operation cancellation
Returns
Promise resolving to the check result
Remarks
Implementations should handle timeouts, retries, and error conditions
gracefully. Failed checks should return a result with status: "down"
rather than throwing, unless the monitor configuration itself is invalid.
Supports optional AbortSignal for operation cancellation.
Throws
Error when monitor configuration is invalid or check fails
catastrophically
Implementation of
getConfig()
getConfig(): MonitorServiceConfig;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:42
Returns
getType()
getType(): TType;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:46
Get the type of monitor this service handles.
Returns
TType
The monitor type this service is responsible for
Remarks
Used by the monitor factory to route checks to the appropriate service.
Must match one of the values in the monitor's type field.
Implementation of
updateConfig()
updateConfig(config: Partial<MonitorServiceConfig>): void;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:50
Update the configuration for this monitor service.
Parameters
config
Partial configuration to update
Returns
void
Remarks
Allows runtime configuration updates without recreating the service instance. Only the provided configuration properties will be updated.
Implementation of
validateConfigUpdate()
protected validateConfigUpdate(_config: Partial<MonitorServiceConfig>): void;
Defined in: electron/services/monitoring/shared/configurableMonitorServiceBase.ts:58
Parameters
_config
Returns
void