v0.38.0
This commit is contained in:
1 parent
df0e39b899
commit
21aef61dd5
35 files changed
+1360
-100
No files matched your search
@@ -70,6 +70,14 @@ struct Cli {
|
||||
_accept_remote_admin_risk: bool,
|
||||
#[arg(long, global = true)]
|
||||
livelogs: bool,
|
||||
#[arg(
|
||||
long,
|
||||
global = true,
|
||||
env = "RUST_PROXY_HEADLESS",
|
||||
action = clap::ArgAction::SetTrue,
|
||||
value_parser = clap::builder::BoolishValueParser::new()
|
||||
)]
|
||||
headless: bool,
|
||||
#[command(subcommand)]
|
||||
command: Option<Command>,
|
||||
}
|
||||
@@ -183,6 +191,8 @@ struct ServeOptions {
|
||||
shutdown_timeout_secs: u64,
|
||||
#[arg(long)]
|
||||
allow_remote_admin: bool,
|
||||
#[arg(long, env = "RUST_PROXY_HEALTH_LISTEN")]
|
||||
health_listen: Option<SocketAddr>,
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
fn disable_transparent_huge_pages() {
|
||||
@@ -316,6 +326,24 @@ async fn application() -> Result<()> {
|
||||
.command
|
||||
.context("a subcommand is required (or use --livelogs)")?;
|
||||
match command {
|
||||
Command::Reload if cli.headless => {
|
||||
signal_headless_reload(&resolve_installed_data_dir(cli.data_dir, data_dir_explicit))
|
||||
}
|
||||
Command::Config {
|
||||
action: ConfigCommand::Reload,
|
||||
} if cli.headless => {
|
||||
signal_headless_reload(&resolve_installed_data_dir(cli.data_dir, data_dir_explicit))
|
||||
}
|
||||
Command::Config {
|
||||
action: ConfigCommand::Validate { file },
|
||||
} if cli.headless => {
|
||||
validate_headless_file(
|
||||
resolve_installed_data_dir(cli.data_dir, data_dir_explicit),
|
||||
cli.admin_listen,
|
||||
file,
|
||||
)
|
||||
.await
|
||||
}
|
||||
Command::Reload => {
|
||||
config_command(
|
||||
resolve_installed_data_dir(cli.data_dir, data_dir_explicit),
|
||||
@@ -374,6 +402,7 @@ async fn application() -> Result<()> {
|
||||
cli.config,
|
||||
startup_locks,
|
||||
update_check,
|
||||
cli.headless,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user