Module service

Source

Structs§

Service
“Manager” class for a set of tasks. Collects all the resources and tasks, then runs tasks until completion.
ServiceBuilder
A builder for Service.
ServiceContext
An interface to the service provided to the tasks during initialization. This the main point of interaction between with the service.
ShutdownHook
A named future that will be invoked after all the tasks are stopped. The future is expected to perform a cleanup or a shutdown of the service.
StopReceiver
Represents a receiver for the stop signal. This signal is sent when the node is shutting down. Every task is expected to listen to this signal and stop its execution when it is received.

Enums§

ServiceError
An error that can occur during the service lifecycle.
TaskError
An error that can occur during the task lifecycle.

Traits§

FromContext
Trait used as input for wiring layers, aiming to provide all the resources the layer needs for wiring.
IntoContext
Trait used as output for wiring layers, aiming to provide all the resources and tasks the layer creates.