pub struct PoolConfig {Show 14 fields
pub name: Arc<str>,
pub min_workers: u32,
pub max_workers: u32,
pub initial_workers: u32,
pub autoscale: Option<AutoscaleConfig>,
pub retry: RetryPolicy,
pub bounds: Bounds,
pub overflow: OverflowPolicy,
pub reservable_fraction: f64,
pub default_duration: Duration,
pub max_hold: Duration,
pub lease_ttl: Option<Duration>,
pub unknown_dependency: UnknownDependency,
pub fairness: Option<Fairness>,
}Expand description
Engine types re-exported for convenience. A worker pool: capacity limits, scaling, retries, queue bounds and fixed-start behaviour.
Fields§
§name: Arc<str>Unique pool name.
min_workers: u32Lower bound on the autoscaler’s desired capacity. Capacity itself may be lower, for
example at start (initial_workers) or when it is reported by remote workers.
max_workers: u32Upper capacity bound for the autoscaler (also sizes the reservation limit).
initial_workers: u32Capacity at start (at most max_workers).
autoscale: Option<AutoscaleConfig>None disables autoscaling (capacity changes only via CapacityChanged).
retry: RetryPolicyDefault retry policy for tasks without their own.
bounds: BoundsPool queue bounds.
overflow: OverflowPolicyWhat to do when a bound is hit.
reservable_fraction: f64Fraction of max_workers that fixed-start reservations may occupy at once (at least 1 slot).
default_duration: DurationDuration estimate when nothing else is known.
max_hold: DurationEarliest a worker may be held free ahead of a fixed-start task.
lease_ttl: Option<Duration>Lease time-to-live; Some for remote workers that must heartbeat.
unknown_dependency: UnknownDependencyHandling of dependencies on unknown keys.
fairness: Option<Fairness>Weighted fair sharing between tenants (None: tasks of a class run in submission
order whatever their tenant).
Implementations§
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more