This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break: replace the Redis options with
--redis-url
- Loading branch information
Showing
5 changed files
with
30 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
use std::net::SocketAddr; | ||
|
||
use clap::Parser; | ||
|
||
#[derive(Parser)] | ||
pub struct Opts { | ||
/// One address is treated as Redis Server address, multiple addresses – as Sentinel addresses. | ||
#[clap( | ||
long = "redis-server", | ||
env = "RUSTY_HOME_REDIS_ADDRESSES", | ||
default_value = "127.0.0.1:6379", | ||
use_value_delimiter = true | ||
)] | ||
pub addresses: Vec<SocketAddr>, | ||
|
||
/// Redis Sentinel master name. | ||
/// Redis URL. | ||
/// See: https://docs.rs/fred/5.0.0/fred/types/struct.RedisConfig.html#method.from_url. | ||
#[clap( | ||
long = "redis-service-name", | ||
env = "RUSTY_HOME_REDIS_SERVICE_NAME", | ||
default_value = "mymaster" | ||
long = "redis-url", | ||
env = "RUSTY_HOME_REDIS_URL", | ||
default_value = "redis://localhost/0" | ||
)] | ||
pub service_name: String, | ||
pub redis_url: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters