Dynamic module cluster

Index

Variables

Interfaces

Classes

Functions

Variables

isMaster: boolean

isWorker: boolean

settings: ClusterSettings

worker: Worker

workers: Worker[]

Functions

addListener(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

disconnect(callback?: Function)

Parameters

  • callback?: Function optional

emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

fork(env?: any): Worker

Parameters

  • env?: any optional

Returns

Worker

listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

on(event: string, listener: Function): any

Parameters

  • event: string
  • listener: Function

Returns

any

once(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

removeAllListeners(event?: string)

Parameters

  • event?: string optional

removeListener(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

setMaxListeners(n: number)

Parameters

  • n: number

setupMaster(settings?: ClusterSettings)

Parameters