import type { CommandContext, RespValue } from '../types.ts'; type ConnectionId = CommandContext['connectionId']; /** * Create one ephemeral Pub/Sub namespace for one RESPlite server instance. * Messages and subscriptions are intentionally not persisted in SQLite. */ export declare function createPubSubBroker(): { subscribe: (context: CommandContext, requestedChannels: Buffer[]) => RespValue[]; unsubscribe: (context: CommandContext, requestedChannels: Buffer[]) => RespValue[]; psubscribe: (context: CommandContext, requestedPatterns: Buffer[]) => RespValue[]; punsubscribe: (context: CommandContext, requestedPatterns: Buffer[]) => RespValue[]; publish: (channel: Buffer, message: Buffer) => number; disconnect: (connectionId: ConnectionId) => void; activeChannels: (pattern?: Buffer | null) => Buffer[]; numsub: (requestedChannels: Buffer[]) => (Buffer | number)[]; numpat: () => number; channelCount: () => number; clientCount: () => number; countFor: (connectionId: ConnectionId) => number; }; export type PubSubBroker = ReturnType; export {};