swarm-wire: take agent_limits's wire types
This commit is contained in:
parent
266be0a5db
commit
9cce9c470f
11 changed files with 122 additions and 115 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue