pipebase 0.2.0

A tokio based runtime library for data integration app
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mod hash;
mod random;
mod roundrobin;
mod runtime;

pub use hash::*;
pub use random::*;
pub use roundrobin::*;
pub use runtime::*;

use crate::common::FromConfig;
use async_trait::async_trait;

#[async_trait]
pub trait Select<T, C>: Send + Sync + FromConfig<C> {
    async fn select(&mut self, t: &T, candidates: &[&usize]) -> anyhow::Result<Vec<usize>>;
}