Run services under supervision.
This crate provides a framework for a process under supervision. It can be extended by different supervision providers, by providing methods for the various multi-methods. A crate can provide configuration for use with a range of supervision providers.
To control a service, the
service function is used.
To configure a job for a service, implement a supervisor-config-map for the
facility and supervision service you wish to use. Ensure the
the supervision implementation is extended by your group-spec.
To create an implementation for a new service supervision provider, implement
Control a process under supervision.
The settings map must provide
:supervisor keys. The
:supervisor key specifies a keyword for the supervisor provider to dispatch
:service-name provides a service name to be used by the supervision
provider. It is not an error to call with
:action :start if the process is
Flag to only apply the action if the service is currently stopped.
Flag to only apply the action only if the specified flag is set.
Specifies an instance id, should there be more than one instance of the
supervisor (not the facility).
Provides an open dispatched supervisor implementation.
Implement a method dispatched on the supervisor keyword to add a supervisor implementation.
: the action to be performed. Should support
: specifies the supervisor instance-id, not the facility instance-id.
The :start action should not complain if the service is already running.
The :restart action should not complain if the service is not running.
The :stop action should not complain if the service is not running.
Predicate to test if a given service implementation is available.
Configure a service implementation based on configuration map. The
map is specific to the supervisor. The initial enabled status of a config is
Configure service supervision for facility based on configuration map.
Supervisor specific options are specified under the supervisor key in the settings map.
This is intended to be called at the crate level.
Return a service configuration map for the given supervisor and facility.
A method should be implemented in each crate for each supervisor to be supported.