rs-zero 0.2.6

Rust-first microservice framework inspired by go-zero engineering practices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Clone)]
pub(super) enum RedisCacheBackend {
    Single(redis::Client),
    Cluster(redis::cluster::ClusterClient),
}

impl std::fmt::Debug for RedisCacheBackend {
    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Single(_) => formatter.write_str("RedisCacheBackend::Single"),
            Self::Cluster(_) => formatter.write_str("RedisCacheBackend::Cluster"),
        }
    }
}