delete agent flow

This commit is contained in:
lda committed 2026-04-14 05:34:56 +07:00
1 parent 3053009a7e
commit 28dda76ee8
13 files changed
+295 -20

No files matched your search

+23
View File
@@ -39,6 +39,8 @@ pub enum Command {
ListEnrollTokens(ListEnrollTokensArgs),
/// Revoke a specific enroll token.
RevokeEnrollToken(RevokeEnrollTokenArgs),
/// Revoke an enrolled agent's persistent credentials.
RevokeAgent(RevokeAgentArgs),
/// Print state backend stats.
StateStats(StateStatsArgs),
/// Send SIGHUP to an already-running daemon.
@@ -189,6 +191,27 @@ pub struct RevokeEnrollTokenArgs {
pub target: AdminTargetArgs,
}
#[derive(Args)]
pub struct RevokeAgentArgs {
#[arg(long, default_value = DEFAULT_CONFIG_FILE)]
pub config_file: PathBuf,
#[arg(long)]
pub state_file: Option<PathBuf>,
#[arg(long)]
pub data_dir: Option<PathBuf>,
#[arg(long)]
pub public_url: Option<String>,
#[arg(long)]
pub agent_id: String,
#[command(flatten)]
pub target: AdminTargetArgs,
}
#[derive(Args)]
pub struct StateStatsArgs {
#[arg(long, default_value = DEFAULT_CONFIG_FILE)]