Process
Index
Constructors
Methods
Constructors
constructor
Returns Process
Methods
staticonHealthCheck
Parameters
callback: () => Promise<string>
the callback executed each time the runtime check the health of the process.
Returns () => void
Static method to register a callback that is used to check the health status of the process. This is typically used by kubernetes environment to maintain backend healthy
The callback must return a Promise which returns a string as valid message. The process is considered by the runtime as unhealthy if the promise is rejected.
Returns void
staticonShutdown
Static method to register a callback called by the runtime when it receives the signal to be terminated. This is typically used to graceful shutdown some connections or drivers to external processes.
The callback must return a Promise which is resolved when the shutdown process is done.
Parameters
callback: () => Promise<void>
the callback executed when the runtime terminates.
Returns () => void
Static method to register a callback called by the runtime when it receives the signal to be terminated. This is typically used to graceful shutdown some connections or drivers to external processes.
The callback must return a Promise which is resolved when the shutdown process is done.
Returns void
Static method to register a callback that is used to check the health status of the process. This is typically used by kubernetes environment to maintain backend healthy
The callback must return a Promise which returns a string as valid message. The process is considered by the runtime as unhealthy if the promise is rejected.