pub struct Config {
pub bucket: String,
pub prefix: String,
pub queue_name: String,
pub pool_id: String,
pub supervisor: PathBuf,
pub poll_interval: Duration,
pub heartbeat_interval: Duration,
pub node_id: String,
}Expand description
Runtime configuration resolved from environment variables at startup.
Fields§
§bucket: String§prefix: String§queue_name: StringOptional queue name for placement-aware routing.
When set, all S3 key paths gain a {queue_name}/ sub-prefix so that
multiple fleet agents on different nodes can each service a distinct
named lane of work without stepping on each other.
Empty string means “default queue” — uses the legacy flat layout and is backwards-compatible with existing deployments that predate placement routing.
pool_id: StringT11 — runner pool identifier. When non-empty, the dispatcher skips
specs whose spec.placement.poolId is set and does not match this
value. Empty string means “no pool constraint” — every spec accepted.
Sourced from CELLOS_FLEET_POOL_ID.
supervisor: PathBuf§poll_interval: Duration§heartbeat_interval: Duration§node_id: StringImplementations§
Source§impl Config
impl Config
pub fn from_env() -> Result<Self>
pub fn queue_prefix(&self) -> String
pub fn pending_prefix(&self) -> String
pub fn claimed_key(&self, spec_id: &str) -> String
pub fn completed_key(&self, spec_id: &str) -> String
pub fn failed_key(&self, spec_id: &str) -> String
Sourcepub fn should_dispatch(&self, spec_pool_id: Option<&str>) -> bool
pub fn should_dispatch(&self, spec_pool_id: Option<&str>) -> bool
T11 — placement gate.
Returns true when this runner should dispatch the spec.
- If the runner has no
pool_idconfigured (env var unset / empty), the spec is always accepted (legacy behaviour). - If the spec carries no
spec.placement.poolId, it is accepted everywhere (a spec without a pool constraint is portable). - Otherwise the spec is accepted only when the two values match
exactly. Mismatches return
falseand the dispatcher logs askipping spec <id>: placement.poolId=<X> != runner poolId=<Y>line at the call site.