agent-stream-kit 0.19.0

Agent Stream Kit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{AgentDefinition, ASKit};

/// Registration entry emitted by the `#[askit_agent]` macro.
pub struct AgentRegistration {
    pub build: fn() -> AgentDefinition,
}

inventory::collect!(AgentRegistration);

/// Register all agents collected via the `#[askit_agent]` macro.
pub fn register_inventory_agents(askit: &ASKit) {
    for reg in inventory::iter::<AgentRegistration> {
        askit.register_agent_definiton((reg.build)());
    }
}