summaryrefslogtreecommitdiff
path: root/libs/shared/src/redis.rs
blob: a196f8d688048c82af12edc8152587df3b7f4bf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use redis::Client;
use serde::Deserialize;


#[derive(Clone, Debug, Deserialize)]
pub struct RedisConfiguration {
    pub url: String,
}

// Allows the configuration to directly create a nats connection
impl Into<Client> for RedisConfiguration {
    fn into(self) -> Client {
        redis::Client::open(self.url).unwrap()
    }
}