Creates a new instance of the shutdown component.
Closes component and frees used resources.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Configures component by passing configuration parameters.
configuration parameters to be set.
Checks if the component is opened.
true if the component has been opened and false otherwise.
Opens the component.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Crashes the process using the configured crash mode.
Generated using TypeDoc
Random shutdown component that crashes the process using various methods.
The component is usually used for testing, but brave developers can try to use it in production to randomly crash microservices. It follows the concept of "Chaos Monkey" popularized by Netflix.
Configuration parameters
Example
let shutdown = new Shutdown(); shutdown.configure(ConfigParams.fromTuples( "mode": "exception" )); shutdown.shutdown(); // Result: Bang!!! the process crashes