Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
18
crates/churn/src/agent.rs
Normal file
18
crates/churn/src/agent.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
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(())
|
||||
}
|
Reference in New Issue
Block a user