churn-v2/crates/churn/src/agent.rs

19 lines
384 B
Rust
Raw Normal View History

use agent_state::AgentState;
use refresh::AgentRefresh;
mod agent_state;
mod refresh;
pub async fn execute(host: impl Into<String>) -> anyhow::Result<()> {
let state = AgentState::new().await?;
notmad::Mad::builder()
.add(AgentRefresh::new(&state, host))
.cancellation(Some(std::time::Duration::from_secs(2)))
.run()
.await?;
Ok(())
}