/** * Copyright 2023 Kapeta Inc. * SPDX-License-Identifier: BUSL-1.1 */ import { Server } from 'socket.io'; import { LogEntry } from './types'; export declare const EVENT_STATUS_CHANGED = "status-changed"; export declare const EVENT_INSTANCE_CREATED = "instance-created"; export declare const EVENT_INSTANCE_EXITED = "instance-exited"; export declare const EVENT_INSTANCE_LOG = "instance-log"; export declare const EVENT_SYSTEM_LOG = "system-log"; export declare const EVENT_LOG = "log"; export declare class SocketManager { private _io; private readonly _sockets; constructor(); setIo(io: Server): void; isAlive(): boolean; private get io(); emit(context: string, type: string, payload: any): void; emitGlobal(type: string, payload: any): void; emitSystemEvent(systemId: string, type: string, payload: any): void; emitInstanceLog(systemId: string, instanceId: string, payload: LogEntry): void; emitSystemLog(systemId: string, payload: LogEntry): void; emitGlobalLog(payload: LogEntry): void; private _bindIO; private _handleSocketCreated; private _bindSocket; private handleJoinRoom; private handleLeaveRoom; } export declare const socketManager: SocketManager;