Aller au contenu principal
Version: Next

ClusterManager

Hierarchy

Index

Constructors

constructor

Properties

readonlyoptions

options: ClusterOptions = {}

Methods

bindWorkerDisconnect

  • bindWorkerDisconnect(listener: (worker: Worker) => void): void

bindWorkerExit

  • bindWorkerExit(listener: (worker: Worker, code: any, signal: any) => void): void

closeWorker

  • closeWorker(worker: Worker): void

createEventBus

  • createEventBus(options: any): any

createWorker

  • createWorker(): any

publicgetWorker

  • getWorker(workerId: string): Worker

getWorkerId

  • getWorkerId(worker: Worker): string

publicgetWorkerIds

  • getWorkerIds(): string[]

publichasWorker

  • hasWorker(workerId: string): boolean

isPrimary

  • isPrimary(): boolean

isWorkerDead

  • isWorkerDead(worker: Worker): boolean

publiconStop

  • onStop(exitListener: any): void

publicstart

  • start(): Promise<void>

publicstop

  • stop(timeout?: number): Promise<void>