Watch
0
0
Fork
You've already forked hyperhive
0

swarm-wire: take agent_limits's wire types

This commit is contained in:
atlas 2026-10-18 12:29:18 +02:00 • committed by mara
commit 9cce9c470f
11 changed files with 122 additions and 115 deletions

View file

@ -1,7 +1,7 @@
//! Reading the caps the swarm sets for this hive's agents.
//!
//! swarm-controller keeps one key per agent in the `agent-limits` bucket
//! ([`swarm_queue_client::agent_limits`]). Every [`READ_INTERVAL`] this reads
//! ([`swarm_wire::agent_limits`]). Every [`READ_INTERVAL`] this reads
//! the key of each agent this hive has and stores what it finds in
//! `swarm-resource-limits.json`, where the drop-in reads it.
//! A running agent gets a changed cap at its first spawn or rebuild after
@ -14,7 +14,8 @@ use std::collections::BTreeMap;
use std::time::Duration;
use anyhow::{Context, Result};
use swarm_queue_client::agent_limits::{self, AgentCaps, Read};
use swarm_queue_client::agent_limits::{self, Read};
use swarm_wire::agent_limits::AgentCaps;
use crate::resource_limits::AgentLimits;
use crate::stats::sweep_health::{self, SweepHealth};
@ -127,7 +128,7 @@ mod tests {
use std::collections::BTreeMap;
use super::validated;
use swarm_queue_client::agent_limits::AgentCaps;
use swarm_wire::agent_limits::AgentCaps;
/// `atlas`'s answer with `atlas_key` as the value read for it, over the
/// hive-wide defaults of 200% / 4G.