Skip to content

Commit

Permalink
Merge pull request #34 from bloq/refresh
Browse files Browse the repository at this point in the history
Refresh
  • Loading branch information
jgarzik authored Mar 29, 2024
2 parents 116731c + 16d851b commit 57be6e3
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 164 deletions.
176 changes: 133 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion memds-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"

[dependencies]
memds-proto = { path = "../memds-proto" }
clap = "2.33"
clap = "3"
futures = "0.1"
grpcio = { version = "0.4", features = ["openssl"] }
protobuf = "~2"
Expand Down
16 changes: 8 additions & 8 deletions memds-cli/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub fn restore(client: &MemdsClient, key: Option<&str>, restore_fn: &str) -> io:
pub mod args {
use clap::{App, Arg, SubCommand};

pub fn del() -> App<'static, 'static> {
pub fn del() -> App<'static> {
SubCommand::with_name("del")
.about("Keys.Del: Delete listed keys")
.arg(
Expand All @@ -203,13 +203,13 @@ pub mod args {
)
}

pub fn dump() -> App<'static, 'static> {
pub fn dump() -> App<'static> {
SubCommand::with_name("dump")
.about("Keys.Dump: Dump listed key")
.arg(Arg::with_name("key").help("Key to dump").required(true))
}

pub fn exists() -> App<'static, 'static> {
pub fn exists() -> App<'static> {
SubCommand::with_name("exists")
.about("Keys.Exists: Count existing listed keys")
.arg(
Expand All @@ -220,7 +220,7 @@ pub mod args {
)
}

pub fn rename() -> App<'static, 'static> {
pub fn rename() -> App<'static> {
SubCommand::with_name("rename")
.about("Keys.Rename: Rename item key")
.arg(
Expand All @@ -235,7 +235,7 @@ pub mod args {
)
}

pub fn renamenx() -> App<'static, 'static> {
pub fn renamenx() -> App<'static> {
SubCommand::with_name("renamenx")
.about("Keys.RenameNX: Rename item key, iff new key does not exist")
.arg(
Expand All @@ -250,7 +250,7 @@ pub mod args {
)
}

pub fn restore() -> App<'static, 'static> {
pub fn restore() -> App<'static> {
SubCommand::with_name("restore")
.about("Keys.Restore: Restore item from dumpfile")
.arg(
Expand All @@ -261,13 +261,13 @@ pub mod args {
.arg(
Arg::with_name("key")
.help("Key of item to query")
.short("k")
.short('k')
.long("key")
.value_name("string"),
)
}

pub fn typ() -> App<'static, 'static> {
pub fn typ() -> App<'static> {
SubCommand::with_name("type")
.about("Keys.Type: Query item data type")
.arg(
Expand Down
Loading

0 comments on commit 57be6e3

Please sign in to comment.