Documentation
    Preparing search index...

    Interface OnBeforeConnectContext<TState, TVars, TInput, TDatabase>

    Context for the onBeforeConnect lifecycle hook. Called before a connection is established, allowing for validation and early rejection.

    interface OnBeforeConnectContext<
        TState,
        TVars,
        TInput,
        TDatabase extends AnyDatabaseProvider,
    > {
        request: Request | undefined;
        get abortSignal(): AbortSignal;
        get actorId(): string;
        get conns(): Map<
            string,
            Conn<TState, TConnParams, TConnState, TVars, TInput, TDatabase>,
        >;
        get db(): InferDatabaseClient<TDatabase>;
        get key(): string[];
        get log(): Logger;
        get name(): string;
        get region(): string;
        get schedule(): Schedule;
        get state(): TState;
        get vars(): TVars;
        broadcast<Args extends unknown[]>(name: string, ...args: Args): void;
        client<R extends Registry<any>>(): Client<R>;
        saveState(opts: SaveStateOptions): Promise<void>;
        sleep(): void;
        waitUntil(promise: Promise<void>): void;
    }

    Type Parameters

    • TState
    • TVars
    • TInput
    • TDatabase extends AnyDatabaseProvider

    Hierarchy (View Summary)

    Index

    Properties

    request: Request | undefined

    The incoming request that initiated the connection. May be undefined for connections initiated without a direct HTTP request.

    Accessors

    Methods