openvibe-sdk/pubsub

Generated at from openvibe-contracts v0.76.0 and openvibe-sdk v0.20.1.

From types/pubsub.d.ts (server only). Declarations are shown verbatim.

interface PubSub

export interface PubSub {
    publish(channel: string, message: unknown): Promise<number>;
    /** Resolves to an unsubscribe function. */
    subscribe(channel: string, handler: (message: any) => void): Promise<() => Promise<void>>;
    close(): Promise<void>;
}

export export function createPubSub(opts?: { valkey?: Valkey | null

export function createPubSub(opts?: { valkey?: Valkey | null; log?: { warn(msg: string): void } }): PubSub;