Anchorage API reference
    Preparing search index...

    Implements

    Index

    Constructors

    • Parameters

      • options: {
            auditQueueName?: string;
            client: WorkersForPlatformsApi;
            clock?: () => number;
            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>;
            };
            hostRoutingKvId: string;
            maintenanceRequestTimeoutMs?: number;
            namespacedState: Readonly<
                {
                    dispatchNamespace: string;
                    sharedOutboundWorkerName: string;
                    stateEgressRootSecret: string;
                },
            >;
            platformProfileFor?: (spec: DeploymentSpec) => ExternalPlatformProfile;
        }
        • Optional ReadonlyauditQueueName?: string
        • Readonlyclient: WorkersForPlatformsApi
        • Optional Readonlyclock?: () => number

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

        • 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>;
          }
        • ReadonlyhostRoutingKvId: string
        • Optional ReadonlymaintenanceRequestTimeoutMs?: number
        • ReadonlynamespacedState: Readonly<
              {
                  dispatchNamespace: string;
                  sharedOutboundWorkerName: string;
                  stateEgressRootSecret: string;
              },
          >
        • Optional ReadonlyplatformProfileFor?: (spec: DeploymentSpec) => ExternalPlatformProfile

      Returns WorkersForPlatformsBackend

    Properties

    immutableExternalArtifacts: true = ...
    kind: "workers-for-platforms" = ...

    Methods

    • Attest the release the hostname actually dispatches to.

      The chain starts at the routing entry rather than at releaseScriptName(spec), and that ordering is the point: an immutable release is only live because the host route names it, so asking the expected release whether it exists proves nothing about what is serving. When the route names a different release — a rollback that landed, a promotion that did not — the attestation reports THAT release, and the caller comparing it against its own expectation is what fails closed.

      Host routing is eventually consistent, so a caller attesting straight after a promotion should go through the shared convergence helper rather than treating one stale read as drift.

      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>