@@ -1,16 +1,7 @@
|
||||
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
use axum::{async_trait};
|
||||
use churn_domain::{ServerEnrollReq};
|
||||
|
||||
|
||||
use axum::async_trait;
|
||||
use churn_domain::ServerEnrollReq;
|
||||
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
@@ -37,8 +28,6 @@ struct DefaultAgentService {
|
||||
leases: Arc<Mutex<Vec<String>>>,
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[async_trait]
|
||||
pub trait AgentServiceTrait {
|
||||
async fn enroll(&self, agent_name: &str, server: &str, lease: &str) -> anyhow::Result<()>;
|
||||
|
@@ -42,14 +42,11 @@ enum Commands {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Default)]
|
||||
struct AppState {
|
||||
agent: AgentService,
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
dotenv::dotenv().ok();
|
||||
|
Reference in New Issue
Block a user