@grand-board/otel-cloudflare - v6.11.0
    Preparing search index...

    Interface ExportedHandler<Env, QueueMessage>

    Cloudflare Workers ExportedHandler interface with generic queue message type

    interface ExportedHandler<Env = unknown, QueueMessage = unknown> {
        fetch?: (
            request: Request,
            env: Env,
            ctx: ExecutionContext,
        ) => Response | Promise<Response>;
        queue?: (
            batch: MessageBatch<QueueMessage>,
            env: Env,
            ctx: ExecutionContext,
        ) => void | Promise<void>;
        scheduled?: (
            controller: ScheduledController,
            env: Env,
            ctx: ExecutionContext,
        ) => void | Promise<void>;
    }

    Type Parameters

    • Env = unknown
    • QueueMessage = unknown
    Index

    Properties

    fetch?: (
        request: Request,
        env: Env,
        ctx: ExecutionContext,
    ) => Response | Promise<Response>
    queue?: (
        batch: MessageBatch<QueueMessage>,
        env: Env,
        ctx: ExecutionContext,
    ) => void | Promise<void>
    scheduled?: (
        controller: ScheduledController,
        env: Env,
        ctx: ExecutionContext,
    ) => void | Promise<void>