agent_tk/
monitor.rs

1//! Monitor the running of the agent
2
3use crate::agent;
4
5//  ___                   _   __  __
6// |_ _|_ __  _ __  _   _| |_|  \/  | ___  ___ ___  __ _  __ _  ___
7//  | || '_ \| '_ \| | | | __| |\/| |/ _ \/ __/ __|/ _` |/ _` |/ _ \
8//  | || | | | |_) | |_| | |_| |  | |  __/\__ \__ \ (_| | (_| |  __/
9// |___|_| |_| .__/ \__,_|\__|_|  |_|\___||___/___/\__,_|\__, |\___|
10//           |_|                                         |___/
11
12/// Input messages to the monitor module
13#[derive(Clone)]
14pub enum InputMessage {}
15
16//  __  __           _       _
17// |  \/  | ___   __| |_   _| | ___
18// | |\/| |/ _ \ / _` | | | | |/ _ \
19// | |  | | (_) | (_| | |_| | |  __/
20// |_|  |_|\___/ \__,_|\__,_|_|\___|
21
22/// Trait for monitor module
23pub trait Module
24{
25  /// Start a new monitor for the agent
26  fn start(
27    agent_data: agent::AgentData,
28    input_receiver: async_broadcast::Receiver<InputMessage>,
29  ) -> impl std::future::Future<Output = ()> + std::marker::Send + 'static;
30}