/**
 * 1. Detects global events and publishes them to all clients subscribed to the websocket channel system.
 *
 * 2.   Sends messages to all nodes in the cluster, and when reached, publishes locally
 *      on the server channel to everyone subscribed.
 */
import type { TProcessAddress } from '@flux/shared/types';
import type { TConnectedClientSocket } from '../../connected-client-socket.types';
import type { RedisConnection } from '../redis/redis-connection.class';
export type TGlobalChannel = string & {
    __brand: 'global-channel';
};
type TWebsocketData = {};
export declare class GlobalChannelPubsub {
    private readonly redisConnection;
    private readonly bunServer;
    private readonly processAddress;
    constructor(redisConnection: RedisConnection, bunServer: Bun.Server<TWebsocketData>, processAddress: TProcessAddress);
    /**
     * Subscribes to the websocket channel event and publishes it on the local process.
     */
    private subscribeWebsocketChannelEvent;
    /**
     * Publishes a message to the given channel.
     *
     * @param { string } channel - The channel name to publish to
     * @param { string } message - The message to publish
     * @param { TConnectedClientSocket } [ws] - Optional websocket to skip when publishing locally
     *
     * @returns { Promise<void> }
     */
    publish(channel: string, message: string, ws?: TConnectedClientSocket): Promise<void>;
}
export {};
