Class

ClientCluster

Extends EventEmitter

Constructor

new ClientCluster(options: ClientClusterOptions)
ParamTypeDescription
optionsClientClusterOptions

Properties

configure?: ((runtime: ClientRuntime) => void | Promise<void>) | undefined (readonly)
destroyed: boolean
pending: Map<string, Promise<void>> (readonly)
runtimes: Map<string, InternalRuntime> (readonly)
size: number (readonly)

Number of managed runtimes (including those still connecting).

Methods

ParamTypeDescription
inputAddClientRuntimeOptions
addAll(inputs: readonly AddClientRuntimeOptions[]): Promise<PromiseSettledResult<ClientRuntime>[]>
ParamTypeDescription
inputsreadonly AddClientRuntimeOptions[]
destroy(): Promise<void>
detachHandlers(rt: InternalRuntime): void
ParamTypeDescription
rtInternalRuntime
emit(event: , args: ClientClusterEventMap[]): boolean
ParamTypeDescription
eventK
argsClientClusterEventMap[]
emit(event: string | symbol, args: unknown[]): boolean
ParamTypeDescription
eventstring | symbol
argsunknown[]
emit(event: string | symbol, args: unknown[]): boolean
ParamTypeDescription
eventstring | symbol
argsunknown[]
get(id: string): ClientRuntime | undefined
ParamTypeDescription
idstring
has(id: string): boolean
ParamTypeDescription
idstring
off(event: , listener: ClientClusterEventListener<>): this
ParamTypeDescription
eventK
listenerClientClusterEventListener<>
off(event: string | symbol, listener: (...args: unknown[]) => void): this
ParamTypeDescription
eventstring | symbol
listener(...args: unknown[]) => void
off(event: string | symbol, listener: (...args: unknown[]) => void): this
ParamTypeDescription
eventstring | symbol
listener(...args: unknown[]) => void
on(event: , listener: ClientClusterEventListener<>): this
ParamTypeDescription
eventK
listenerClientClusterEventListener<>
on(event: string | symbol, listener: (...args: unknown[]) => void): this
ParamTypeDescription
eventstring | symbol
listener(...args: unknown[]) => void
on(event: string | symbol, listener: (...args: unknown[]) => void): this
ParamTypeDescription
eventstring | symbol
listener(...args: unknown[]) => void
once(event: , listener: ClientClusterEventListener<>): this
ParamTypeDescription
eventK
listenerClientClusterEventListener<>
once(event: string | symbol, listener: (...args: unknown[]) => void): this
ParamTypeDescription
eventstring | symbol
listener(...args: unknown[]) => void
once(event: string | symbol, listener: (...args: unknown[]) => void): this
ParamTypeDescription
eventstring | symbol
listener(...args: unknown[]) => void
remove(id: string): Promise<boolean>
ParamTypeDescription
idstring
restart(id: string, opts: RestartClientRuntimeOptions): Promise<ClientRuntime>
ParamTypeDescription
idstring
optsRestartClientRuntimeOptions
runAdd(id: string, token: string, input: AddClientRuntimeOptions, abort: AbortController): Promise<void>
ParamTypeDescription
idstring
tokenstring
inputAddClientRuntimeOptions
abortAbortController
runtimeValues(): IterableIterator<ClientRuntime>
toPublic(rt: InternalRuntime): ClientRuntime
ParamTypeDescription
rtInternalRuntime
values(): ClientRuntime[]

Snapshot of current runtimes.