@bitsinfra/fusee
    Preparing search index...

    Class InvocationHandler

    The worker side of invocations over HTTP (suspend to zero): when a Fusee server started with --invoke URL has work for shards no worker holds, it POSTs to that URL; each request opens a fresh engine for the invocation's shards, runs them until they are idle or the budget ends, and closes it. Mount node on node:http or Express (before any body parser, or after express.raw()), export lambda as an AWS Lambda handler, or use fetch with the Fetch API (Bun, Deno, Vercel, Cloudflare).

    Index
    • get fetch(): (request: Request) => Promise<Response>

      For the Fetch API: (request: Request) => Promise<Response>.

      Returns (request: Request) => Promise<Response>

    • get lambda(): (
          event: {
              body?: string | null;
              headers?: Record<string, string | undefined>;
              isBase64Encoded?: boolean;
          },
      ) => Promise<InvocationReply>

      An AWS Lambda handler (function URL, API Gateway or ALB proxy events).

      Returns (
          event: {
              body?: string | null;
              headers?: Record<string, string | undefined>;
              isBase64Encoded?: boolean;
          },
      ) => Promise<InvocationReply>

    • get node(): (req: any, res: any) => void

      For node:http, Express and other (req, res) frameworks.

      Returns (req: any, res: any) => void

    • Verifies, runs the invocation, and answers: 200 with a summary, 401, 400 or 503.

      Parameters

      • req: { body: string | Uint8Array<ArrayBufferLike>; headers?: Headers }

      Returns Promise<InvocationReply>