Anchorage API reference
    Preparing search index...
    interface ThreadTopology {
        forward(
            tenant: TenantContext,
            threadId: string,
            request: Request,
        ): Promise<Response>;
        send(
            tenant: TenantContext,
            threadId: string,
            path: string,
            init?: ThreadRequestInit,
        ): Promise<Response>;
    }
    Index

    Methods

    Methods

    • Forward a client Request (e.g. a verified WebSocket upgrade) to a thread DO, with the tenant header OVERWRITTEN from the authenticated context. Same ownership 404 as send. Use this instead of stub.fetch(request): a verbatim forward carries the client's own headers, including a forged x-flowsafe-tenant.

      Parameters

      Returns Promise<Response>

    • Send an authenticated request to a thread DO. path is the DO-side route (e.g. /messages). Throws RunRouteError(404) when the tenant does not own threadId — before the DO is addressed, so a foreign thread is never even woken, and the caller surfaces the 404 its router already maps.

      Parameters

      Returns Promise<Response>