@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface CrashableBackend

    A DurabilityBackend that can be crashed (see crashable).

    interface CrashableBackend {
        inbox: InboxJournal;
        outbox: OutboxJournal;
        exclusive?: boolean;
        start?(): Promise<void>;
        stop?(): Promise<void>;
        inner: DurabilityBackend;
        crashed: boolean;
        whenCrashed: Promise<void>;
        crash(): void;
        crashBefore(op: JournalOp, nth?: number): void;
        crashAfter(op: JournalOp, nth?: number): void;
        calls: ReadonlyMap<JournalOp, number>;
        scope?(name: string): CrashableBackend;
    }

    Hierarchy (View Summary)

    Index
    exclusive?: boolean

    true when only one process can use the backend at a time (memory, file). A restarted process then knows every lease of its instanceId is its own dead incarnation's.

    The wrapped backend (what survives the crash).

    crashed: boolean

    True once crashed.

    whenCrashed: Promise<void>

    Resolves when the crash happens.

    calls: ReadonlyMap<JournalOp, number>

    Number of calls of each operation so far.

    • Crash now: every later call hangs forever.

      Returns void

    • Crash when the nth (default 1st) call of op starts, before it reaches the backend.

      Parameters

      Returns void

    • Crash when the nth (default 1st) call of op committed, before its caller sees the result.

      Parameters

      Returns void