@drupflare/workforce - v0.3.0
    Preparing search index...

    Class WorkerdPlane

    The operations every executor has.

    Anything a particular executor cannot do is absent from here and reached through a capability instead, so this interface stays the set of things that work everywhere.

    Implements

    Index
    capabilities: PlaneCapabilities = WORKERD_CAPABILITIES
    credentialKey: string

    the credential this plane spends against, so a hub can share one budget across planes

    endpoint: string
    kind: "workerd" = ...
    • A node does not serve a deployed bundle back; the version id is an address, not a body.

      Parameters

      • name: string

      Returns Promise<Response>

    • Removes a site. The route is session-only, so a node may refuse an API token here.

      Parameters

      • name: string

      Returns Promise<void>

    • The node's own log, which is what tails means here: it owns the process that wrote it.

      Parameters

      • options: { level?: string; limit?: number; site?: string } = {}

      Returns Promise<BastionLogLine[]>

    • The Prometheus exposition the node serves; text rather than JSON, so it skips the envelope.

      Returns Promise<string>

    • Parameters

      • name: string
      • _secret: { name: string; text: string }

      Returns Promise<void>

    • Sends a share of traffic to one version.

      A real split at the node's own front door, keyed per visitor rather than per request, so a session stays on one side of it for as long as the rollout lasts.

      Parameters

      • name: string
      • version: string
      • percent: number

      Returns Promise<BastionDeployment>

    • the node's own report: what it is running and how it is

      Returns Promise<Record<string, unknown>>

    • Deploys a bundle to a site that already exists.

      A site is a host, a bundle path and a probe, and an upload carries none of the three, so an unknown site is a named refusal from the node rather than a site invented from a Worker name.

      Parameters

      Returns Promise<UploadResult>

    • Versions of one site, newest first.

      GET /api/versions answers for everything the token reaches, so the site filter is on the rows rather than on a query parameter.

      Parameters

      • name: string

      Returns Promise<BastionVersion[]>