Anchorage API reference
    Preparing search index...
    interface InitOptions {
        id?: string;
        pubsub?: PubSub;
        requestContextForRun?: RequestContextProvider;
        resumeLedger?: ResumeLedger;
        tablePrefix?: string;
    }
    Index

    Properties

    id?: string

    Storage instance id when init builds the D1 store. Default: 'flowsafe'.

    pubsub?: PubSub

    The host Durable Object's single pubsub identity — createHostPubSub() for the default in-process emitter, or any PubSub the host built. init() is where a DO's identity is established: it echoes the instance on InitResult, so every consumer in the isolate takes THAT one rather than building its own (core defaults a fresh emitter per createRun, and two such feeds never see each other's events — see pubsub.ts).

    OPT-IN: absent, InitResult.pubsub is undefined and no consumer has one to pass, so the host is byte-identical to before this seam existed (polling stays the fallback).

    requestContextForRun?: RequestContextProvider

    Server-side requestContext source consulted on every start/resume — the grant-minting seam. See RequestContextProvider in runtime.ts.

    resumeLedger?: ResumeLedger

    Explicit resume ledger (see RunnerRuntimeOptions.resumeLedger). When omitted, the runtime defaults to in-memory and the DO shell adopts a ctx.storage-backed ledger.

    tablePrefix?: string

    Table name prefix when init builds the D1 store.