Sync / foldkit-durable

RecoveryOptions

interface · packages/durable/src/journal.ts:204

interface RecoveryOptions<Operation> {
  readonly key: DocumentId
  readonly from: Cursor
  readonly intents: (operation: Operation) => ReadonlyArray<RecoveryIntent>
  readonly onUnresolved?: (
    intent: RecoveryIntent,
    record: Option.Option<EffectRecord>,
  ) => 'retry' | 'skip'
}

Members

RecoveryOptions.key

property · packages/durable/src/journal.ts:205

readonly key: DocumentId

RecoveryOptions.from

property · packages/durable/src/journal.ts:207

readonly from: Cursor

The application's recovery cursor; operations at or before it are settled.

RecoveryOptions.intents

property · packages/durable/src/journal.ts:209

readonly intents: (operation: Operation) => ReadonlyArray<RecoveryIntent>

The effect intents an operation declares, in the order they must run.

RecoveryOptions.onUnresolved

property · packages/durable/src/journal.ts:214

readonly onUnresolved?: (
  intent: RecoveryIntent,
  record: Option.Option<EffectRecord>,
) => 'retry' | 'skip'

Whether to retry an unresolved intent, or skip it and stop advancing. Defaults to retry; use skip for an intent awaiting manual resolution.