wd_balancing 0.0.4

A practical load balancing library for rust
Documentation
//负载均衡策略
#[async_trait::async_trait]
pub trait BalancingStrategy<K: Send>{
    async fn add(&self,_k:K,_n:usize);
    async fn remove(&self,_k:K);
    async fn select(&self)->Option<K>;
}

#[async_trait::async_trait]
pub trait Linker<K: Send>{
    async fn acquire(&self,_k:K);
    async fn release(&self,_k:K);
}

//回调函数,暂时没有吊用
#[async_trait::async_trait]
pub trait BalancingCall<Req,Res>{
    async fn call(&self,reqs:Req)->Option<Res>;
}