28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
|
import { LoggerMasterOptions } from '@navy.gif/logger';
|
||
|
import { ClientOptions } from './Client.js';
|
||
|
|
||
|
export type ShardingOptions = {
|
||
|
// Auto only works if there is a way of programmatically determining the amount of shards,
|
||
|
// otherwise these will default to 1
|
||
|
shardList?: 'auto' | number[],
|
||
|
totalShards?: 'auto' | number,
|
||
|
|
||
|
// Whether the client should be respawned if it dies unexpectedly
|
||
|
respawn?: boolean,
|
||
|
// Args that are passed to the script
|
||
|
scriptArgs?: string[],
|
||
|
// Node arguments to be passed into the child process
|
||
|
execArgv?: string[],
|
||
|
// This is set internally to the value of clientPath, i.e. this is the path of the script ran by the child
|
||
|
path?: string,
|
||
|
clientOptions?: ClientOptions,
|
||
|
debug?: boolean
|
||
|
}
|
||
|
|
||
|
export type ControllerOptions = {
|
||
|
rootDir: string, // Defined by the startup script
|
||
|
clientPath: string, // Client (script that is ran in the child process) path relative to root dir
|
||
|
logger: LoggerMasterOptions,
|
||
|
shardOptions: ShardingOptions,
|
||
|
client: ClientOptions
|
||
|
}
|