Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Execute a cluster command on all clusters
Whatever message you want to send with the command (defaults to null
)
Whether you expect something to be returned to you from the command (defaults to false
)
How long to wait for a return (defaults to options.fetchTimeout
)
Function which will be run everytime a new command return is received
Promise which provides a map with the data replied mapped by cluster ID if receptive = true
Sends an eval to all clusters. The eval occurs from a function within the BaseClusterWorker class. NOTE: Use evals sparingly as they are a major security risk
String to send to eval
Whether you expect something to be returned to you from the command (defaults to false
)
How long to wait for a return (defaults to options.fetchTimeout
)
Function which will be run everytime a new command return is received
Promise which provides a map with the data replied mapped by cluster ID if receptive = true
Broadcast an event to all clusters and services. The event can be listened to with register
Name of the event
Message to send
Execute a cluster command
ID of the cluster
Whatever message you want to send with the command (defaults to null
)
Whether you expect something to be returned to you from the command (defaults to false
)
How long to wait for a return (defaults to options.fetchTimeout
)
Promise with data if receptive = true
Sends an eval to the mentioned cluster. The eval occurs from a function within the BaseClusterWorker class. NOTE: Use evals sparingly as they are a major security risk
ID of the cluster
String to send to eval
Whether you expect something to be returned to you from the command (defaults to false
)
How long to wait for a return (defaults to options.fetchTimeout
)
Promise with result if receptive = true
Force eris-fleet to fetch fresh stats
Promise with stats
Create a service
Unique ame of the service
Absolute path to the service file
Promise which resolves with the service object when it is ready
Sends a debug log to the Admiral
Item to log
Custom error source
Sends an error log to the Admiral
Item to log
Custom error source
Fetch a cached channel from the Eris client on any cluster
Channel ID
The Eris channel object converted to JSON
Fetch a cached guild from the Eris client on any cluster
Guild ID
The Eris guild object converted to JSON
Fetch a cached member from the Eris client on any cluster
Guild ID
the member's user ID
The Eris member object converted to JSON
Fetch a cached user from the Eris client on any cluster
User ID
The Eris user object converted to JSON
The latest stats
Collection of clusters and collection of services
Sends an info log to the Admiral
Item to log
Custom error source
Sends a log to the Admiral
Item to log
Custom error source
Name of the event
Function run when event is received
Reshards all clusters
Change the resharding options
Promise which resolves when resharding is complete (note that this only resolves when using a service or the Admiral)
Restarts all clusters
Whether to ignore the soft shutdown function
Restarts all services
Whether to ignore the soft shutdown function
Restarts a specific cluster
ID of the cluster to restart
Whether to ignore the soft shutdown function
Promise which resolves with the cluster object when it restarts
Restarts a specific service
Name of the service
Whether to ignore the soft shutdown function
Promise which resolves with the service object when it restarts
Send a message to a specific cluster. The event can be listened to with register
ID of the cluster
Name of the event
Message to send
Send to the master process.
The event can be listened to using Admiral.on("event", listener);
Name of the event
Message to send
Execute a service command
Name of the service
Whatever message you want to send with the command (defaults to null
)
Whether you expect something to be returned to you from the command (defaults to false
)
How long to wait for a return (defaults to options.fetchTimeout
)
Promise with data if receptive = true
Sends an eval to the mentioned service. The eval occurs from a function within the BaseServiceWorker class. NOTE: Use evals sparingly as they are a major security risk
Name of the service
String to send to eval
Whether you expect something to be returned to you from the command (defaults to false
)
How long to wait for a return (defaults to options.fetchTimeout
)
Promise with result if receptive = true
Shuts down a cluster
The ID of the cluster to shutdown
Whether to ignore the soft shutdown function
Promise which resolves with the cluster object when it shuts down
Shuts down a service
The name of the service
Whether to ignore the soft shutdown function
Promise which resolves with the service object when it shuts down
Shuts down everything and exits the master process
Whether to ignore the soft shutdown function
Unregisters an event
Name of the event
Function which was listening. Leave empty if you want to delete all listeners registered to this event name.
Sends a warn log to the Admiral
Item to log
Custom error source
Generated using TypeDoc
Handles communication between clusters, services, and the admiral.