kjuulh
ee323e99e8
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
26 lines
528 B
Rust
26 lines
528 B
Rust
use agent_state::AgentState;
|
|
use event_handler::EventHandler;
|
|
use refresh::AgentRefresh;
|
|
|
|
pub use config::setup_config;
|
|
|
|
mod agent_state;
|
|
mod config;
|
|
mod discovery_client;
|
|
mod event_handler;
|
|
mod grpc_client;
|
|
mod refresh;
|
|
|
|
pub async fn execute() -> anyhow::Result<()> {
|
|
let state = AgentState::new().await?;
|
|
|
|
notmad::Mad::builder()
|
|
.add(AgentRefresh::new(&state))
|
|
.add(EventHandler::new(&state))
|
|
.cancellation(Some(std::time::Duration::from_secs(2)))
|
|
.run()
|
|
.await?;
|
|
|
|
Ok(())
|
|
}
|