"cluster" | typescript
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

isMaster

isMaster: boolean

isWorker

isWorker: boolean

settings

settings: ClusterSettings

worker

worker: Worker

workers

workers: object

Type declaration

Functions

addListener

  • addListener(event: string, listener: Function): Cluster
  • addListener(event: "disconnect", listener: function): Cluster
  • addListener(event: "exit", listener: function): Cluster
  • addListener(event: "fork", listener: function): Cluster
  • addListener(event: "listening", listener: function): Cluster
  • addListener(event: "message", listener: function): Cluster
  • addListener(event: "online", listener: function): Cluster
  • addListener(event: "setup", listener: function): Cluster
  • events.EventEmitter

    1. disconnect
    2. exit
    3. fork
    4. listening
    5. message
    6. online
    7. setup

    Parameters

    • event: string
    • listener: Function

    Returns Cluster

  • Parameters

    • event: "disconnect"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "exit"
    • listener: function
        • (worker: Worker, code: number, signal: string): void
        • Parameters

          • worker: Worker
          • code: number
          • signal: string

          Returns void

    Returns Cluster

  • Parameters

    • event: "fork"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "listening"
    • listener: function

    Returns Cluster

  • Parameters

    Returns Cluster

  • Parameters

    • event: "online"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "setup"
    • listener: function
        • (settings: any): void
        • Parameters

          • settings: any

          Returns void

    Returns Cluster

disconnect

  • disconnect(callback?: Function): void
  • Parameters

    • Optional callback: Function

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • emit(event: "disconnect", listener: function): boolean
  • emit(event: "exit", listener: function): boolean
  • emit(event: "fork", listener: function): boolean
  • emit(event: "listening", listener: function): boolean
  • emit(event: "message", listener: function): boolean
  • emit(event: "online", listener: function): boolean
  • emit(event: "setup", listener: function): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

  • Parameters

    • event: "disconnect"
    • listener: function
        • Parameters

          Returns void

    Returns boolean

  • Parameters

    • event: "exit"
    • listener: function
        • (worker: Worker, code: number, signal: string): void
        • Parameters

          • worker: Worker
          • code: number
          • signal: string

          Returns void

    Returns boolean

  • Parameters

    • event: "fork"
    • listener: function
        • Parameters

          Returns void

    Returns boolean

  • Parameters

    • event: "listening"
    • listener: function

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    • event: "online"
    • listener: function
        • Parameters

          Returns void

    Returns boolean

  • Parameters

    • event: "setup"
    • listener: function
        • (settings: any): void
        • Parameters

          • settings: any

          Returns void

    Returns boolean

eventNames

  • eventNames(): string[]
  • Returns string[]

fork

  • Parameters

    • Optional env: any

    Returns Worker

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string): number
  • Parameters

    • type: string

    Returns number

listeners

  • listeners(event: string): Function[]
  • Parameters

    • event: string

    Returns Function[]

on

  • on(event: string, listener: Function): Cluster
  • on(event: "disconnect", listener: function): Cluster
  • on(event: "exit", listener: function): Cluster
  • on(event: "fork", listener: function): Cluster
  • on(event: "listening", listener: function): Cluster
  • on(event: "message", listener: function): Cluster
  • on(event: "online", listener: function): Cluster
  • on(event: "setup", listener: function): Cluster
  • Parameters

    • event: string
    • listener: Function

    Returns Cluster

  • Parameters

    • event: "disconnect"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "exit"
    • listener: function
        • (worker: Worker, code: number, signal: string): void
        • Parameters

          • worker: Worker
          • code: number
          • signal: string

          Returns void

    Returns Cluster

  • Parameters

    • event: "fork"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "listening"
    • listener: function

    Returns Cluster

  • Parameters

    Returns Cluster

  • Parameters

    • event: "online"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "setup"
    • listener: function
        • (settings: any): void
        • Parameters

          • settings: any

          Returns void

    Returns Cluster

once

  • once(event: string, listener: Function): Cluster
  • once(event: "disconnect", listener: function): Cluster
  • once(event: "exit", listener: function): Cluster
  • once(event: "fork", listener: function): Cluster
  • once(event: "listening", listener: function): Cluster
  • once(event: "message", listener: function): Cluster
  • once(event: "online", listener: function): Cluster
  • once(event: "setup", listener: function): Cluster
  • Parameters

    • event: string
    • listener: Function

    Returns Cluster

  • Parameters

    • event: "disconnect"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "exit"
    • listener: function
        • (worker: Worker, code: number, signal: string): void
        • Parameters

          • worker: Worker
          • code: number
          • signal: string

          Returns void

    Returns Cluster

  • Parameters

    • event: "fork"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "listening"
    • listener: function

    Returns Cluster

  • Parameters

    Returns Cluster

  • Parameters

    • event: "online"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "setup"
    • listener: function
        • (settings: any): void
        • Parameters

          • settings: any

          Returns void

    Returns Cluster

prependListener

  • prependListener(event: string, listener: Function): Cluster
  • prependListener(event: "disconnect", listener: function): Cluster
  • prependListener(event: "exit", listener: function): Cluster
  • prependListener(event: "fork", listener: function): Cluster
  • prependListener(event: "listening", listener: function): Cluster
  • prependListener(event: "message", listener: function): Cluster
  • prependListener(event: "online", listener: function): Cluster
  • prependListener(event: "setup", listener: function): Cluster
  • Parameters

    • event: string
    • listener: Function

    Returns Cluster

  • Parameters

    • event: "disconnect"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "exit"
    • listener: function
        • (worker: Worker, code: number, signal: string): void
        • Parameters

          • worker: Worker
          • code: number
          • signal: string

          Returns void

    Returns Cluster

  • Parameters

    • event: "fork"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "listening"
    • listener: function

    Returns Cluster

  • Parameters

    Returns Cluster

  • Parameters

    • event: "online"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "setup"
    • listener: function
        • (settings: any): void
        • Parameters

          • settings: any

          Returns void

    Returns Cluster

prependOnceListener

  • prependOnceListener(event: string, listener: Function): Cluster
  • prependOnceListener(event: "disconnect", listener: function): Cluster
  • prependOnceListener(event: "exit", listener: function): Cluster
  • prependOnceListener(event: "fork", listener: function): Cluster
  • prependOnceListener(event: "listening", listener: function): Cluster
  • prependOnceListener(event: "message", listener: function): Cluster
  • prependOnceListener(event: "online", listener: function): Cluster
  • prependOnceListener(event: "setup", listener: function): Cluster
  • Parameters

    • event: string
    • listener: Function

    Returns Cluster

  • Parameters

    • event: "disconnect"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "exit"
    • listener: function
        • (worker: Worker, code: number, signal: string): void
        • Parameters

          • worker: Worker
          • code: number
          • signal: string

          Returns void

    Returns Cluster

  • Parameters

    • event: "fork"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "listening"
    • listener: function

    Returns Cluster

  • Parameters

    Returns Cluster

  • Parameters

    • event: "online"
    • listener: function
        • Parameters

          Returns void

    Returns Cluster

  • Parameters

    • event: "setup"
    • listener: function
        • (settings: any): void
        • Parameters

          • settings: any

          Returns void

    Returns Cluster

removeAllListeners

  • removeAllListeners(event?: string): Cluster
  • Parameters

    • Optional event: string

    Returns Cluster

removeListener

  • removeListener(event: string, listener: Function): Cluster
  • Parameters

    • event: string
    • listener: Function

    Returns Cluster

setMaxListeners

  • setMaxListeners(n: number): Cluster
  • Parameters

    • n: number

    Returns Cluster

setupMaster

  • Parameters

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc