pub struct PoolContext {
pub label: String,
pub primary: bool,
}Expand description
The worker pool a plugin instance is running in (phase 85).
In the fork-after-warm model an operator can scale subsystems independently
by giving a plugin its own worker pool ([http].workers, [jobs].workers).
A plugin that must be reachable from every pool — because other pools call
into it (e.g. jobs.push, invoked from HTTP handlers) — declares
Plugin::runs_in_every_pool and is
booted in each one. Such a plugin uses primary to tell its
owning pool (do the full work: run consumers) from pools where it exists
only to expose a cross-cutting capability (push-only, no consumers).
Fields§
§label: StringPool label: the plugin name for a dedicated pool, "shared" otherwise.
primary: booltrue in the plugin’s owning pool (its dedicated pool, or the shared
pool when it has no dedicated one); false where the plugin is present
only as a cross-cutting producer. Single-pool plugins (http/grpc) are
always true in the one pool they run in.
Trait Implementations§
Source§impl Clone for PoolContext
impl Clone for PoolContext
Source§fn clone(&self) -> PoolContext
fn clone(&self) -> PoolContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more