Abstract Class: MonitorServiceAdapterBase<TType>
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:28
Base class implementing the shared, non-behavioral parts of IMonitorService adapters.
Type Parameters
TType
TType extends Site["monitors"][number]["type"]
Implements
Constructors
Constructor
protectednew MonitorServiceAdapterBase<TType>(args: {axiosInstance:AxiosInstance;config:MonitorServiceConfig;type:TType; }):MonitorServiceAdapterBase<TType>
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:37
Parameters
args
axiosInstance
config
type
TType
Returns
MonitorServiceAdapterBase<TType>
Properties
axiosInstance
protectedaxiosInstance:AxiosInstance
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:31
config
protectedconfig:MonitorServiceConfig
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:33
type
privatereadonlytype:TType
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:35
Methods
check()
abstractcheck(monitor:Monitor,signal?:AbortSignal):Promise<MonitorCheckResult>
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:47
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
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error When monitor configuration is invalid or check fails catastrophically
Implementation of
getType()
getType():
"cdn-edge-consistency"|"dns"|"http"|"http-header"|"http-json"|"http-keyword"|"http-latency"|"http-status"|"ping"|"port"|"replication"|"server-heartbeat"|"ssl"|"websocket-keepalive"
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:52
Get the type of monitor this service handles.
Returns
"cdn-edge-consistency" | "dns" | "http" | "http-header" | "http-json" | "http-keyword" | "http-latency" | "http-status" | "ping" | "port" | "replication" | "server-heartbeat" | "ssl" | "websocket-keepalive"
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()
abstractupdateConfig(config:Partial<MonitorServiceConfig>):void
Defined in: electron/services/monitoring/shared/monitorServiceAdapterBase.ts:56
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.