Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata get/patch subcommands to restatectl #2010

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 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 crates/metadata-store/src/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub use service::{Error, LocalMetadataStoreService};

use crate::local::grpc::client::LocalMetadataStoreClient;

/// Creates a [`MetadataStoreClient`] for the [`LocalMetadataStoreService`].
/// Creates a [`MetadataStoreClient`].
pub async fn create_client(
metadata_store_client_options: MetadataStoreClientOptions,
) -> Result<MetadataStoreClient, GenericError> {
Expand Down
5 changes: 5 additions & 0 deletions tools/restatectl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,24 @@ restate-types = { workspace = true }
restate-wal-protocol = { workspace = true }

anyhow = { workspace = true }
bytes = { workspace = true }
bytestring = { workspace = true }
chrono = { workspace = true }
clap = { version = "4.1", features = ["derive", "env", "wrap_help", "color"] }
clap-verbosity-flag = { version = "2.0.1" }
cling = { version = "0.1.0", default-features = false, features = ["derive"] }
crossterm = { version = "0.27.0" }
ctrlc = { version = "3.4" }
derive_more = { workspace = true }
futures-util = { workspace = true }
hyper-util = { workspace = true }
itertools = { workspace = true }
json-patch = "2.0.0"
prost-types = { workspace = true }
rlimit = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
strum = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
Expand Down
8 changes: 6 additions & 2 deletions tools/restatectl/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
use std::str::FromStr;

use cling::prelude::*;
use restate_types::net::AdvertisedAddress;

use restate_cli_util::CliContext;
use restate_cli_util::CommonOpts;
use restate_types::net::AdvertisedAddress;

use crate::commands::dump::Dump;
use crate::commands::log::Log;
use crate::commands::metadata::Metadata;
use crate::commands::node::Node;

#[derive(Run, Parser, Clone)]
Expand All @@ -35,7 +36,7 @@ pub struct CliApp {
#[derive(Parser, Collect, Debug, Clone)]
pub struct ConnectionInfo {
/// Cluster Controller host:port (e.g. http://localhost:5122/)
#[clap(long, value_hint= clap::ValueHint::Url, default_value_t = AdvertisedAddress::from_str("http://localhost:5122/").unwrap(), global = true)]
#[clap(long, value_hint = clap::ValueHint::Url, default_value_t = AdvertisedAddress::from_str("http://localhost:5122/").unwrap(), global = true)]
pub cluster_controller: AdvertisedAddress,
}

Expand All @@ -50,6 +51,9 @@ pub enum Command {
/// Cluster node status
#[clap(subcommand)]
Nodes(Node),
/// Cluster metadata
#[clap(subcommand)]
Metadata(Metadata),
}

fn init(common_opts: &CommonOpts) {
Expand Down
Loading
Loading