Dynamic module cluster

Index

Variables

Interfaces

Functions

Variables

isMaster: boolean

isWorker: boolean

settings: ClusterSettings

workers: any

Functions

addListener(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

disconnect(callback?: Function)

Parameters

  • callback?: Function optional

emit(event: string, arg1?: any, arg2?: any)

Parameters

  • event: string
  • arg1?: any optional
  • arg2?: any optional

fork(env?: any): Worker

Parameters

  • env?: any optional

Returns

Worker

listeners(event: string): Array<{ Function: any; }>

Parameters

  • event: string

Returns

Array<{ Function: any; }>

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

Parameters

  • event: string
  • listener: Function

Returns

any

once(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

removeAllListener(event: string)

Parameters

  • event: string

removeListener(event: string, listener: Function)

Parameters

  • event: string
  • listener: Function

setMaxListeners(n: number)

Parameters

  • n: number

setupMaster(settings?: ClusterSettings)

Parameters