Constructors
constructor
- new SentinelRunner(sentinel, automations?, onTriggerResult?): SentinelRunner
-
Parameters
-
sentinel: SentinelModule<SentinelParams<SchemaFields & PayloadFields & {
archivist?: ArchivistModuleConfig;
name?: string;
paging?: Record<string, {
size?: number;
}>;
schema: string;
security?: {
allowAnonymous?: boolean;
allowed?: Record<string, (string | CosigningAddressSet)[]>;
disallowed?: Record<string, string[]>;
};
storeQueries?: boolean;
} & Omit<Omit<SchemaFields & PayloadFields & {
archivist?: ArchivistModuleConfig;
name?: string;
paging?: Record<string, {
size?: number;
}>;
schema: "network.xyo.node.sentinel";
security?: {
allowAnonymous?: boolean;
allowed?: Record<string, (string | CosigningAddressSet)[]>;
disallowed?: Record<string, string[]>;
};
storeQueries?: boolean;
} & Omit<SchemaFields & PayloadFields & {
archivist?: ArchivistModuleConfig;
name?: string;
paging?: Record<string, {
size?: number;
}>;
schema: string;
security?: {
allowAnonymous?: boolean;
allowed?: Record<string, (string | CosigningAddressSet)[]>;
disallowed?: Record<string, string[]>;
};
storeQueries?: boolean;
} & Omit<{
archivists?: string[];
schema: string;
}, "schema"> & {
schema: "network.xyo.node.sentinel";
witnesses?: string[];
} & {
schema: string;
}, "schema">, "schema"> & {
schema: string;
}, "schema">, undefined>, SentinelModuleEventData>
-
-
Properties
Protected _automations
Protected onTriggerResult
Protected sentinel
sentinel: SentinelModule<SentinelParams<SchemaFields & PayloadFields & { archivist?: ArchivistModuleConfig; name?: string; paging?: Record<string, { size?: number; }>; schema: string; security?: { allowAnonymous?: boolean; allowed?: Record<string, (string | CosigningAddressSet)[]>; disallowed?: Record<string, string[]>; }; storeQueries?: boolean; } & Omit<Omit<SchemaFields & PayloadFields & { archivist?: ArchivistModuleConfig; name?: string; paging?: Record<string, { size?: number; }>; schema: "network.xyo.node.sentinel"; security?: { allowAnonymous?: boolean; allowed?: Record<string, (string | CosigningAddressSet)[]>; disallowed?: Record<string, string[]>; }; storeQueries?: boolean; } & Omit<SchemaFields & PayloadFields & { archivist?: ArchivistModuleConfig; name?: string; paging?: Record<string, { size?: number; }>; schema: string; security?: { allowAnonymous?: boolean; allowed?: Record<string, (string | CosigningAddressSet)[]>; disallowed?: Record<string, string[]>; }; storeQueries?: boolean; } & Omit<{ archivists?: string[]; schema: string; }, "schema"> & { schema: "network.xyo.node.sentinel"; witnesses?: string[]; } & { schema: string; }, "schema">, "schema"> & { schema: string; }, "schema">, undefined>, SentinelModuleEventData>
Protected Optional timeoutId
timeoutId?: Timer
Private trigger
trigger: any
Accessors
automations
- get automations(): Record<string, SentinelAutomationPayload>
-
Private next
- get next(): any
-
Returns any
Methods
add
- add(automation, restart?): Promise<string>
-
Parameters
-
-
Optional restart: boolean
Returns Promise<string>
find
- find(hash): void
-
Returns void
remove
- remove(hash, restart?): Promise<void>
-
Parameters
-
hash: string
-
Optional restart: boolean
Returns Promise<void>
removeAll
- removeAll(): void
-
Returns void
restart
- restart(): Promise<void>
-
Returns Promise<void>
start
- start(): Promise<void>
-
Returns Promise<void>
stop
- stop(): void
-
Returns void
update
- update(hash, automation, restart?): Promise<void>
-
Parameters
-
hash: string
-
-
Optional restart: boolean
Returns Promise<void>