19 lines
384 B
Rust
19 lines
384 B
Rust
|
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(())
|
||
|
}
|