Setu-TS
    Preparing search index...

    Interface IRedisBackplaneClient

    The ioredis-shaped client surface the Redis transport uses.

    Declared structurally so ioredis is never a hard dependency (§12.2) and an application may inject any compatible client.

    0.2.0

    interface IRedisBackplaneClient {
        status?: string;
        connect?(): Promise<unknown>;
        disconnect?(): void;
        off(
            event: string,
            listener: (channel: string, message: string) => void,
        ): void;
        on(
            event: string,
            listener: (channel: string, message: string) => void,
        ): void;
        ping?(): Promise<unknown>;
        publish(channel: string, message: string): Promise<number>;
        quit(): Promise<unknown>;
        subscribe(channel: string): Promise<unknown>;
        unsubscribe(channel: string): Promise<unknown>;
    }
    Index
    status?: string

    M70c: the ioredis connection state ('ready' when usable). Optional for the same reason as ping.

    0.2.0

    • Opens a caller-owned lazy connection. The backplane awaits this at start only when an injected client's status is 'wait', before subscribing.

      Returns Promise<unknown>

      Resolves when the client is connected

      0.11.0

    • Forcibly closes the connection without waiting for the server and stops reconnecting. Optional; the real ioredis client exposes it. close() calls it when quit() fails — during an outage — because a QUIT that never reached the server does not stop ioredis reconnecting: without it the connection comes back and re-subscribes after the application has stopped. An injected client without it is left as quit() left it.

      Returns void

      0.8.0

    • Removes a previously registered listener.

      Parameters

      • event: string

        The event name

      • listener: (channel: string, message: string) => void

        The listener to remove

      Returns void

    • Registers an event listener. The transport listens for 'message'.

      Parameters

      • event: string

        The event name

      • listener: (channel: string, message: string) => void

        Invoked with the channel and the raw message

      Returns void

    • Publishes a message to a channel.

      Parameters

      • channel: string

        The channel name

      • message: string

        The message payload

      Returns Promise<number>

      The number of subscribers that received it