In addition to the facilities listed below, there are also some procedures that provide commonly needed constructors and destructors for services Service De- and Constructors.
Register all services, so that they can be taken into account when trying to resolve dependencies.
Return a list of all registered services which provide the symbol name.
This macro is used to create a value for the actions
slot of a
service object Slots of services. Each name is a symbol
and each proc the corresponding procedure that will be called to
perform the action. A proc has one argument, which will be the
current value of the running
slot of the service.
Start a registered service providing obj.
Start the services named by services, a list of symbols, in the background. In other words, this procedure returns immediately without waiting until all of services have been started.
This procedure can be useful in a configuration file because it lets you
interact right away with shepherd using the herd
command.
Stop a registered service providing obj.
The same as the action
method of class <service>
, but
uses a service that provides obj and is running.
Call proc, a procedure taking one argument, once for each registered service.
Check if any of services is running. If this is the case,
return its canonical name. If not, return #f
. Only the first
one will be returned; this is because this is mainly intended to be
applied on the return value of lookup-services
.