Expand description
ServerPlugin helper trait for the common case: a plugin that runs one
long-lived background task (HTTP server, queue consumer, etc.) and shuts
down when the server signals shutdown.
Most plugins should implement ServerPlugin rather than Plugin
directly, then wrap with ServerPluginWrapper.
Structs§
- Server
Plugin Wrapper - Wraps a
ServerPluginso it can be used as aPlugin. Spawnsrunat boot, awaits the task during shutdown.
Traits§
- Server
Plugin - Trait for plugins that run a single long-lived background task.
The
runfuture should observectx.shutdownand return when signaled.