Remote / foldkit-remote/outbox

OutboxOptions

interface · packages/remote/src/outbox.ts:58

interface OutboxOptions<AppModel> {
  readonly key: (model: AppModel) => string
  readonly scope: (model: AppModel) => string
  readonly retry?: RetryOptions | undefined
}

How outbox keeps durable writes across a reload.

Members

OutboxOptions.key

property · packages/remote/src/outbox.ts:63

readonly key: (model: AppModel) => string

Where the queue is stored, from the Model: one key per principal, so one person's waiting writes are never sent as another's.

OutboxOptions.scope

property · packages/remote/src/outbox.ts:69

readonly scope: (model: AppModel) => string

Who the queue is for, the principal. One stored under another scope reads as empty and is never written over; a page whose scope changes sends nothing it read for the old one, and reads the new one's.

OutboxOptions.retry

property · packages/remote/src/outbox.ts:71

readonly retry?: RetryOptions | undefined

The wait between sends nothing answered: 1 second doubling to 30, unless given.