Stone.js API
    Preparing search index...

    A serverless Broadcaster for API Gateway WebSocket APIs.

    With no held sockets, a broadcast reads the channel's members from the shared store and posts to each connection via the API Gateway Management API. The management endpoint is per-invocation (it comes from the event), so the adapter calls useEndpoint before dispatching. Local listeners are also notified, for handlers that react within the same invocation.

    Implements

    • Broadcaster
    Index
    name: string

    A human-readable name (e.g. 'memory', 'redis').

    store: ConnectionStore
    • Type Parameters

      • T = unknown

      Parameters

      • channel: string
      • event: string
      • Optionalpayload: T

      Returns Promise<void>

    • Parameters

      • channel: string

      Returns Promise<PresenceMember<unknown>[]>

    • Type Parameters

      • T = unknown

      Parameters

      • channel: string
      • listener: RealtimeListener<T>

      Returns () => void

    • Parameters

      • channel: string

      Returns { emit: <T = unknown>(event: string, payload?: T) => Promise<void> }

    • Set the management endpoint for the current invocation (rebuilds the client when it changes).

      Parameters

      • endpoint: string

        The https://<domain>/<stage> endpoint.

      Returns void