Bun

interface

cluster.ClusterSettings

interface ClusterSettings

  • args?: string[]

    String arguments passed to worker.

  • cwd?: string

    Current working directory of the worker process.

  • exec?: string

    File path to worker file.

  • execArgv?: string[]

    List of string arguments passed to the Node.js executable.

  • gid?: number

    Sets the group identity of the process. (See setgid(2).)

  • inspectPort?: number | () => number

    Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. By default each worker gets its own port, incremented from the primary's process.debugPort.

  • serialization?: SerializationType
  • silent?: boolean

    Whether or not to send output to parent's stdio.

  • stdio?: any[]

    Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must contain an 'ipc' entry. When this option is provided, it overrides silent. See child_prcess.spawn()'s stdio.

  • uid?: number

    Sets the user identity of the process. (See setuid(2).)

  • windowsHide?: boolean

    Hide the forked processes console window that would normally be created on Windows systems.