Cluster.prependListener - Node documentation
method Cluster.prependListener

Usage in Deno

import { type Cluster } from "node:cluster";
Cluster.prependListener(
event: string,
listener: (...args: any[]) => void,
): this

Parameters

event: string
listener: (...args: any[]) => void

Return Type

this
Cluster.prependListener(
event: "disconnect",
listener: (worker: Worker) => void,
): this

Parameters

event: "disconnect"
listener: (worker: Worker) => void

Return Type

this
Cluster.prependListener(
event: "exit",
listener: (
worker: Worker,
code: number,
signal: string,
) => void
,
): this

Parameters

event: "exit"
listener: (
worker: Worker,
code: number,
signal: string,
) => void

Return Type

this
Cluster.prependListener(
event: "fork",
listener: (worker: Worker) => void,
): this

Parameters

event: "fork"
listener: (worker: Worker) => void

Return Type

this
Cluster.prependListener(
event: "listening",
listener: (
worker: Worker,
address: Address,
) => void
,
): this

Parameters

event: "listening"
listener: (
worker: Worker,
address: Address,
) => void

Return Type

this
Cluster.prependListener(
event: "message",
listener: (
worker: Worker,
message: any,
handle?: net.Socket | net.Server,
) => void
,
): this

Parameters

event: "message"
listener: (
worker: Worker,
message: any,
handle?: net.Socket | net.Server,
) => void

Return Type

this
Cluster.prependListener(
event: "online",
listener: (worker: Worker) => void,
): this

Parameters

event: "online"
listener: (worker: Worker) => void

Return Type

this
Cluster.prependListener(
event: "setup",
listener: (settings: ClusterSettings) => void,
): this

Parameters

event: "setup"
listener: (settings: ClusterSettings) => void

Return Type

this