CAPITAN
DISTRIBUTED SYSTEMS AND SERVICE LIBRARY (WIP)
Service
struct LB;
#[async_trait]
impl Service for LB {
async fn init(&mut self) -> Res<()> {
println!("initializing lb");
Ok(())
}
async fn main(&mut self) -> Res<()> {
input.fetch_add(1, Ordering::Relaxed);
println!("the reactor currently holds {:?}", input);
Ok(())
}
async fn repeat(&mut self) -> Res<()> {
Ok(())
}
async fn catch(&mut self, e: Err) -> Res<()> {
println!("lb fallback");
Ok(())
}
async fn abort(&mut self) -> Res<()> {
println!("aborting");
Ok(())
}
}