Interface: SiteMonitoringDependencies
Defined in: src/stores/sites/useSiteMonitoring.ts:32
External dependencies required for monitoring actions.
Propertiesโ
applyStatusUpdate?โ
optionalapplyStatusUpdate?: (sites:Site[],update:StatusUpdateSnapshotPayload) =>Site[]
Defined in: src/stores/sites/useSiteMonitoring.ts:40
Applies status update snapshots to the current sites collection.
Parametersโ
sitesโ
Site[]
updateโ
Returnsโ
Site[]
Remarksโ
Defaults to applyStatusUpdateSnapshot. Override for testing to inspect inputs without mutating state.
clearOptimisticMonitoringLocks?โ
optionalclearOptimisticMonitoringLocks?: (siteIdentifier:string,monitorIds: readonlystring[]) =>void
Defined in: src/stores/sites/useSiteMonitoring.ts:45
Clears optimistic monitoring locks for the provided monitors.
Parametersโ
siteIdentifierโ
string
monitorIdsโ
readonly string[]
Returnsโ
void
getOptimisticMonitoringLocks?โ
optionalgetOptimisticMonitoringLocks?: () =>Partial<Record<string,OptimisticMonitoringLock>>
Defined in: src/stores/sites/useSiteMonitoring.ts:50
Snapshot accessor for current optimistic monitoring locks.
Returnsโ
Partial<Record<string, OptimisticMonitoringLock>>
getSitesโ
getSites: () =>
Site[]
Defined in: src/stores/sites/useSiteMonitoring.ts:54
Reads current sites from the store for optimistic updates
Returnsโ
Site[]
monitoringServiceโ
monitoringService:
Pick<typeofMonitoringService,"checkSiteNow"|"startMonitoringForMonitor"|"startMonitoringForSite"|"stopMonitoringForMonitor"|"stopMonitoringForSite">
Defined in: src/stores/sites/useSiteMonitoring.ts:56
Monitoring service abstraction
registerMonitoringLock?โ
optionalregisterMonitoringLock?: (siteIdentifier:string,monitorIds: readonlystring[],monitoring:boolean,durationMs:number) =>void
Defined in: src/stores/sites/useSiteMonitoring.ts:65
Registers optimistic monitoring locks for the provided monitors.
Parametersโ
siteIdentifierโ
string
monitorIdsโ
readonly string[]
monitoringโ
boolean
durationMsโ
number
Returnsโ
void
setSitesโ
setSites: (
sites:Site[]) =>void
Defined in: src/stores/sites/useSiteMonitoring.ts:72
Replaces the sites collection in the store
Parametersโ
sitesโ
Site[]
Returnsโ
void