pub struct FleetReport {
pub agent_reports: HashMap<String, AgentStatus>,
}Expand description
Status aggregation from subordinate agents.
Fields§
§agent_reports: HashMap<String, AgentStatus>Implementations§
Source§impl FleetReport
impl FleetReport
pub fn new() -> Self
Sourcepub fn add(&mut self, agent_id: &str, status: AgentStatus)
pub fn add(&mut self, agent_id: &str, status: AgentStatus)
Add an agent’s status to the report.
Sourcepub fn status_counts(&self) -> HashMap<AgentStatus, usize>
pub fn status_counts(&self) -> HashMap<AgentStatus, usize>
Count of agents in each status.
Sourcepub fn operational(&self) -> bool
pub fn operational(&self) -> bool
Is the fleet operational? (at least one Ready agent and no Compromised).
Sourcepub fn offline_agents(&self) -> Vec<&str>
pub fn offline_agents(&self) -> Vec<&str>
Agents that are currently offline.
Trait Implementations§
Source§impl Clone for FleetReport
impl Clone for FleetReport
Source§fn clone(&self) -> FleetReport
fn clone(&self) -> FleetReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FleetReport
impl RefUnwindSafe for FleetReport
impl Send for FleetReport
impl Sync for FleetReport
impl Unpin for FleetReport
impl UnsafeUnpin for FleetReport
impl UnwindSafe for FleetReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more