scylla-proxy 0.0.6

Proxy layer between ScyllaDB driver and cluster that enables testing ScyllaDB drivers' behaviour in unfavourable conditions
Documentation
mod actions;
mod errors;
mod frame;
pub mod nlb;
mod proxy;

pub type TargetShard = u16;

pub use actions::{
    Action, Condition, Reaction, RequestReaction, RequestRule, ResponseReaction, ResponseRule,
    example_db_errors,
};
pub use errors::{DoorkeeperError, ProxyError, WorkerError};
pub use frame::{RequestFrame, RequestOpcode, ResponseFrame, ResponseOpcode};
pub use proxy::{Node, Proxy, RunningProxy, ShardAwareness};

pub use proxy::get_exclusive_local_address;

#[cfg(test)]
pub(crate) fn setup_tracing() {
    use tracing_subscriber::Layer;
    use tracing_subscriber::layer::SubscriberExt;
    use tracing_subscriber::util::SubscriberInitExt;

    let testing_layer = tracing_subscriber::fmt::layer()
        .with_test_writer()
        .with_filter(tracing_subscriber::EnvFilter::from_default_env());
    let noop_layer = tracing_subscriber::fmt::layer().with_writer(std::io::sink);
    let _ = tracing_subscriber::registry()
        .with(testing_layer)
        .with(noop_layer)
        .try_init();
}