Sync / foldkit-sync/journal

ServerJournalOptions

interface · packages/sync/src/serverJournal.ts:286

interface ServerJournalOptions<Document, Principal, Shared, Reactions> {
  readonly sync: Document
  readonly journal: Journal<Operation, Shared, Principal, WrittenOperation>
  readonly server: Principal
  readonly reactions?: Reactions
  readonly runsPerPass?: number
  readonly diagnostics?: ReportDiagnostic | undefined
}

Members

ServerJournalOptions.sync

property · packages/sync/src/serverJournal.ts:287

readonly sync: Document

ServerJournalOptions.journal

property · packages/sync/src/serverJournal.ts:288

readonly journal: Journal<Operation, Shared, Principal, WrittenOperation>

ServerJournalOptions.server

property · packages/sync/src/serverJournal.ts:297

readonly server: Principal

Who the server commits as. Never resolved from a request, and best never changed: the journal binds each server/ replica id to the first actor that commits from it. After a change of actorId, a reaction's append for a new trigger and a new appendAsServer key commit as the new actor; a redelivered key is an IdentityConflictError, and a run retried after its first append committed under the old actor parks.

ServerJournalOptions.reactions

property · packages/sync/src/serverJournal.ts:298

readonly reactions?: Reactions

ServerJournalOptions.runsPerPass

property · packages/sync/src/serverJournal.ts:300

readonly runsPerPass?: number

The most runs one react starts, over every reaction; a host with a time limit sets it low.

ServerJournalOptions.diagnostics

property · packages/sync/src/serverJournal.ts:302

readonly diagnostics?: ReportDiagnostic | undefined

Where reactions' failures, parks and skips go; the reporter in context when not given.