From 55e5c7d2ff2c51584067baaa5eb40c8157fca749 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" Date: Tue, 8 Jul 2025 09:18:31 +0000 Subject: [PATCH] refactor/expose-config: ### Make SubCommand and Fields Public in `frontend.rs` - Made `subcmd` field in `Command` struct public. - Made `SubCommand` enum public. - Made `config_file` and `env_prefix` fields in `StartCommand` struct public. These changes enhance the accessibility of command-related structures and fields, facilitating external usage and integration. Signed-off-by: Lei, HUANG --- src/cmd/src/frontend.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/src/frontend.rs b/src/cmd/src/frontend.rs index f4e1a4fe36..d1827941e9 100644 --- a/src/cmd/src/frontend.rs +++ b/src/cmd/src/frontend.rs @@ -102,7 +102,7 @@ impl App for Instance { #[derive(Parser)] pub struct Command { #[clap(subcommand)] - subcmd: SubCommand, + pub subcmd: SubCommand, } impl Command { @@ -116,7 +116,7 @@ impl Command { } #[derive(Parser)] -enum SubCommand { +pub enum SubCommand { Start(StartCommand), } @@ -153,7 +153,7 @@ pub struct StartCommand { #[clap(long)] postgres_addr: Option, #[clap(short, long)] - config_file: Option, + pub config_file: Option, #[clap(short, long)] influxdb_enable: Option, #[clap(long, value_delimiter = ',', num_args = 1..)] @@ -169,7 +169,7 @@ pub struct StartCommand { #[clap(long)] disable_dashboard: Option, #[clap(long, default_value = "GREPTIMEDB_FRONTEND")] - env_prefix: String, + pub env_prefix: String, } impl StartCommand {