From 2c3ca0c77cdfd1214646bc497ace8273fc24a4c4 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" <193874+carols10cents@users.noreply.github.com> Date: Thu, 23 Dec 2021 07:17:39 -0500 Subject: [PATCH] docs: Add doc comments to all CLI subcommands (#3414) * docs: Add doc comments to all CLI subcommands * docs: Update influxdb_iox/src/commands/database/recover.rs Co-authored-by: Andrew Lamb Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- influxdb_iox/src/commands/database.rs | 19 +++++++++++++++++++ influxdb_iox/src/commands/database/recover.rs | 2 +- influxdb_iox/src/commands/run/mod.rs | 5 +++++ influxdb_iox/src/main.rs | 13 +++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/influxdb_iox/src/commands/database.rs b/influxdb_iox/src/commands/database.rs index 93d67a55d1..6b72ccf6fd 100644 --- a/influxdb_iox/src/commands/database.rs +++ b/influxdb_iox/src/commands/database.rs @@ -194,15 +194,34 @@ struct Claim { /// All possible subcommands for database #[derive(Debug, StructOpt)] enum Command { + /// Create a new database Create(Create), + + /// Get list of databases List(List), + + /// Return configuration of specific database Get(Get), + + /// Write data into the specified database Write(Write), + + /// Query the data with SQL Query(Query), + + /// Manage database chunks Chunk(chunk::Config), + + /// Manage database partitions Partition(partition::Config), + + /// Recover broken databases Recover(recover::Config), + + /// Release a database from its current server owner Release(Release), + + /// Claim an unowned database Claim(Claim), } diff --git a/influxdb_iox/src/commands/database/recover.rs b/influxdb_iox/src/commands/database/recover.rs index 30c789beb7..823033b812 100644 --- a/influxdb_iox/src/commands/database/recover.rs +++ b/influxdb_iox/src/commands/database/recover.rs @@ -39,7 +39,7 @@ pub struct Config { command: Command, } -/// All possible subcommands for catalog +/// All possible subcommands for recovering broken databases #[derive(Debug, StructOpt)] enum Command { /// Wipe preserved catalog diff --git a/influxdb_iox/src/commands/run/mod.rs b/influxdb_iox/src/commands/run/mod.rs index 8adae32636..e3d68351cd 100644 --- a/influxdb_iox/src/commands/run/mod.rs +++ b/influxdb_iox/src/commands/run/mod.rs @@ -46,8 +46,13 @@ impl Config { #[derive(Debug, StructOpt)] enum Command { + /// Run the server in database mode Database(database::Config), + + /// Run the server in routing mode Router(router::Config), + + /// Run the server in test mode Test(test::Config), } diff --git a/influxdb_iox/src/main.rs b/influxdb_iox/src/main.rs index 7212801dd1..fe20e43fb6 100644 --- a/influxdb_iox/src/main.rs +++ b/influxdb_iox/src/main.rs @@ -145,13 +145,26 @@ struct Config { #[derive(Debug, StructOpt)] enum Command { + /// Database-related commands Database(commands::database::Config), + + /// Run the InfluxDB IOx server // Clippy recommended boxing this variant because it's much larger than the others Run(Box), + + /// Router-related commands Router(commands::router::Config), + + /// IOx server configuration commands Server(commands::server::Config), + + /// Manage long-running IOx operations Operation(commands::operations::Config), + + /// Start IOx interactive SQL REPL loop Sql(commands::sql::Config), + + /// Interrogate internal database data Debug(commands::debug::Config), }