Sync / foldkit-sync/do

DocumentHostServer

interface · packages/sync/src/do.ts:86

interface DocumentHostServer<Principal, Env> {
  readonly principal: Principal
  readonly reactions: (env: Env) => ReadonlyArray<Reaction<unknown, never>>
  readonly runsPerPass?: number | undefined
}

The server's own side of the document, for defineDocumentHost's server.

Members

DocumentHostServer.principal

property · packages/sync/src/do.ts:88

readonly principal: Principal

Who the server commits as. Never resolved from a request, and never changed.

DocumentHostServer.reactions

property · packages/sync/src/do.ts:90

readonly reactions: (env: Env) => ReadonlyArray<Reaction<unknown, never>>

The document's reactions, made from the environment (a mailer's key, a binding).

DocumentHostServer.runsPerPass

property · packages/sync/src/do.ts:92

readonly runsPerPass?: number | undefined

The most runs one pass starts.