new ShardMasterConfig()
Configuration for the Shard Master. This config will be updated
during runtime if it is edited. Relevant settings may be sent to each shard
during each initial setup.
- Source:
Classes
Members
-
autoDetectInterval :number
-
The interval to check for how many shards we should have at one time, in milliseconds.
Type:
- number
- Source:
-
autoDetectNumShards :boolean
-
Whether to use the shard count Discord recommends for us. If true, the bot name must be specified, and the corresponding token must be available in `../auth.js`.
Type:
- boolean
- Source:
-
botName :string
-
The name of the bot that corresponds to the token to use in `../auth.js`.
Type:
- string
- Default Value:
-
- release
- Source:
-
connCount :number
-
The maximum number of connection attempts within connTime before the IP address is blocked.
Type:
- number
- Default Value:
-
- 10
- Source:
-
connTime :number
-
The duration in milliseconds to store connection attempt history.
Type:
- number
- Default Value:
-
- 10000
- Source:
-
copyFiles :Array.<string>
-
Paths to files to send to slave shards every time they successfully connect. These are expected to be immediately overwritten on the slave shards once received.
Type:
- Array.<string>
- Default Value:
-
- ["./auth.js","./gApiCredentials.json","./save/patreonCreatorTokens.json"]
- Source:
-
heartbeat :ShardMasterConfig~HeartbeatConfig
-
Configuration specifying how detecting if shards are still online shall work.
Type:
- ShardMasterConfig~HeartbeatConfig
- Source:
-
mail :ShardMasterConfig~MailConfig
-
Configuration specifying how to alert admins about important system updates.
Type:
- ShardMasterConfig~MailConfig
- Source:
-
masterHost :object
-
Host information for the master shard to use in order to be able to find us.
Type:
- object
- Default Value:
-
- {"host":"localhost","port":8024,"protocol":"http:","path":"/socket.io/"}
- Source:
-
numShards :number
-
The number of shards to start if auto detection is turned off.
Type:
- number
- Default Value:
-
- 2
- Source:
-
remoteHost :object
-
Host information for remote shards to use in order to be able to find us.
Type:
- object
- Default Value:
-
- {"host":"kamino.spikeybot.com","port":443,"protocol":"https:","path":"/socket.io/"}
- Source:
-
respawnDelay :number
-
Delay between shard reboot requests in milliseconds.
Type:
- number
- Default Value:
-
- 5000
- Source:
-
shardBotLaunchArgs :Array.<string>
-
Arguments to pass to the bot's scripts when the shard is started.
Type:
- Array.<string>
- Default Value:
-
- []
- Source:
-
shardNodeLaunchArgs :Array.<string>
-
CLI args to pass to NodeJS when spawning a shard.
Type:
- Array.<string>
- Default Value:
-
- ["--max-old-space-size=2048"]
- Source:
-
tsPrecision :number
-
The largest acceptable difference in timestamp values received from shards in milliseconds.
Type:
- number
- Default Value:
-
- 5 Minutes
- Source: