redis_grpc/lib.rs
1#[macro_use]
2extern crate tracing;
3
4pub mod conn;
5pub mod grpc;
6
7#[derive(Debug)]
8pub struct AppConfig {
9 pub port: String,
10 pub host: String,
11}
12
13impl Default for AppConfig {
14 fn default() -> Self {
15 let port = std::env::var("REDIS_GRPC_PORT").unwrap_or("50051".to_string());
16 let host = std::env::var("REDIS_GRPC_HOST").unwrap_or("redis://0.0.0.0:6379".to_string());
17 AppConfig { port, host }
18 }
19}