distributed_scheduler/driver/
mod.rs1mod utils;
2
3#[cfg(feature = "driver-etcd")]
4pub mod etcd;
6pub mod local;
8#[cfg(feature = "driver-redis")]
9pub mod redis;
11#[cfg(feature = "driver-redis")]
12pub mod redis_zset;
14
15#[async_trait::async_trait]
16pub trait Driver {
18 type Error: std::error::Error + Send + Sync + 'static;
19
20 fn node_id(&self) -> String;
22 async fn get_nodes(&self) -> Result<Vec<String>, Self::Error>;
24
25 async fn start(&mut self) -> Result<(), Self::Error> {
27 Ok(())
28 }
29}