Anchorage API reference
    Preparing search index...

    Implements

    Index

    Constructors

    • Parameters

      • options: {
            clock?: () => number;
            exportDirectory: string;
            exportStore: DurableDatabaseExportStore;
            fetch?: {
                (
                    input: URL | RequestInfo<unknown, CfProperties<unknown>>,
                    init?: RequestInit<RequestInitCfProperties>,
                ): Promise<Response>;
                (
                    input: string | URL | Request<unknown, CfProperties<unknown>>,
                    init?: RequestInit<CfProperties<unknown>>,
                ): Promise<Response>;
            };
            maintenanceRequestTimeoutMs?: number;
            routeApi: PlainWorkerRouteApi;
            runner: CommandRunner;
        }
        • Optional Readonlyclock?: () => number

          Stamps observedAt on an attestation. Injected so it can be pinned.

        • ReadonlyexportDirectory: string
        • ReadonlyexportStore: DurableDatabaseExportStore
        • Optional Readonlyfetch?: {
              (
                  input: URL | RequestInfo<unknown, CfProperties<unknown>>,
                  init?: RequestInit<RequestInitCfProperties>,
              ): Promise<Response>;
              (
                  input: string | URL | Request<unknown, CfProperties<unknown>>,
                  init?: RequestInit<CfProperties<unknown>>,
              ): Promise<Response>;
          }
        • Optional ReadonlymaintenanceRequestTimeoutMs?: number
        • ReadonlyrouteApi: PlainWorkerRouteApi
        • Readonlyrunner: CommandRunner

      Returns WranglerLoopBackend

    Properties

    kind: "plain-worker" = ...

    Methods

    • Attest the version serving traffic, which for an ordinary Worker is the one the deployment object holds at 100%.

      inspect() cannot answer this. Given an expected artifact version it pins that candidate even while the candidate sits at 0%, because a converge has to compare a staged upload against the specification before promoting it. Reusing it here would report an unpromoted candidate as though it were live, which is the exact failure this method exists to make impossible.

      The read goes through the provider API rather than the wrangler CLI: the CLI is outside the shared rate coordinator, so a poll loop driven through it would spend account-wide provider quota that nothing is counting.

      physicalScriptName is the spec's script rather than a value read back from the custom domain, because the hostname-to-script binding is already enforced on the path that can change it: promoteWorker fails unless the custom domain attests this exact script after every promotion, and #attestPromotionRoute refuses a hostname owned by a Worker outside the promotion guard. Re-reading the domain here would spend a third provider call against the two-read budget this method documents and learn nothing those two checks have not already established.

      Parameters

      Returns Promise<ActiveRouteAttestation>

    • Stamp the database's ownership sentinel and seed its initial execution fence row.

      initialExecutionFenceState is a REQUIRED option rather than backend configuration because it is a per-provisioning decision: the same control plane brings ordinary deployments up open and migration targets up locked. It carries no default anywhere on this path — a migration target that came up open would be executing exactly when it must not.

      It rides an OPTIONS object rather than a fourth positional because this method is implemented by every backend and faked by every test that builds one: the next piece of provisioning context to reach the seeding protocol would otherwise mean a fifth positional and the same fan-out again, and positional four and five of a five-argument call are exactly where a transposed argument compiles and provisions the wrong thing.

      Parameters

      Returns Promise<void>