#[allow(dead_code)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FlagKind {
Path,
Str,
Bool,
U64,
U32,
U16,
Usize,
Octal,
SocketAddr,
IpAddr,
ClockSource,
EvictionPolicy,
SignalHandlerMode,
List,
}
#[derive(Clone, Copy, Debug)]
pub struct FlagSpec {
pub cli: &'static str,
pub key: &'static str,
pub kind: FlagKind,
pub feature: &'static str,
}
pub const FLAGS: &[FlagSpec] = &[
FlagSpec {
cli: "--socket",
key: "socket",
kind: FlagKind::Path,
feature: "",
},
FlagSpec {
cli: "--threshold-ms",
key: "threshold_ms",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--socket-mode",
key: "socket_mode",
kind: FlagKind::Octal,
feature: "",
},
FlagSpec {
cli: "--read-timeout-ms",
key: "read_timeout_ms",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--udp-port",
key: "udp_port",
kind: FlagKind::U16,
feature: "",
},
FlagSpec {
cli: "--udp-bind-addr",
key: "udp_bind_addr",
kind: FlagKind::IpAddr,
feature: "",
},
FlagSpec {
cli: "--key-file",
key: "secure_key_file",
kind: FlagKind::Path,
feature: "secure-udp",
},
FlagSpec {
cli: "--accepted-key-file",
key: "accepted_key_file",
kind: FlagKind::Path,
feature: "secure-udp",
},
FlagSpec {
cli: "--master-key-file",
key: "master_key_file",
kind: FlagKind::Path,
feature: "secure-udp",
},
FlagSpec {
cli: "--recovery-exec",
key: "recovery_exec_cmd",
kind: FlagKind::Str,
feature: "",
},
FlagSpec {
cli: "--recovery-exec-file",
key: "recovery_exec_file",
kind: FlagKind::Path,
feature: "",
},
FlagSpec {
cli: "--recovery-debounce-ms",
key: "recovery_debounce_ms",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--recovery-env",
key: "recovery_env",
kind: FlagKind::List,
feature: "",
},
FlagSpec {
cli: "--recovery-inherit-env",
key: "recovery_inherit_env",
kind: FlagKind::Bool,
feature: "",
},
FlagSpec {
cli: "--recovery-timeout-ms",
key: "recovery_timeout_ms",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--recovery-audit-file",
key: "recovery_audit_file",
kind: FlagKind::Path,
feature: "",
},
FlagSpec {
cli: "--recovery-audit-max-bytes",
key: "recovery_audit_max_bytes",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--recovery-audit-sync-every",
key: "recovery_audit_sync_every",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--audit-fsync-budget-ms",
key: "audit_fsync_budget_ms",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--audit-sync-interval-ms",
key: "audit_sync_interval_ms",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--audit-rotation-budget-ms",
key: "audit_rotation_budget_ms",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--recovery-capture-stdio",
key: "recovery_capture_stdio",
kind: FlagKind::Bool,
feature: "",
},
FlagSpec {
cli: "--recovery-capture-bytes",
key: "recovery_capture_bytes",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--export-file",
key: "file_export",
kind: FlagKind::Path,
feature: "",
},
FlagSpec {
cli: "--export-file-max-bytes",
key: "export_file_max_bytes",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--export-file-sync-every",
key: "export_file_sync_every",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--prom-addr",
key: "",
kind: FlagKind::SocketAddr,
feature: "prometheus-exporter",
},
FlagSpec {
cli: "--prom-token-file",
key: "",
kind: FlagKind::Path,
feature: "prometheus-exporter",
},
FlagSpec {
cli: "--prom-rate-limit-per-sec",
key: "",
kind: FlagKind::U32,
feature: "prometheus-exporter",
},
FlagSpec {
cli: "--prom-rate-limit-burst",
key: "",
kind: FlagKind::U32,
feature: "prometheus-exporter",
},
FlagSpec {
cli: "--tracker-capacity",
key: "tracker_capacity",
kind: FlagKind::Usize,
feature: "",
},
FlagSpec {
cli: "--eviction-scan-window",
key: "eviction_scan_window",
kind: FlagKind::Usize,
feature: "",
},
FlagSpec {
cli: "--tracker-eviction-policy",
key: "tracker_eviction_policy",
kind: FlagKind::EvictionPolicy,
feature: "",
},
FlagSpec {
cli: "--clock-source",
key: "clock_source",
kind: FlagKind::ClockSource,
feature: "",
},
FlagSpec {
cli: "--max-beat-rate",
key: "max_beat_rate",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--global-beat-rate",
key: "global_beat_rate",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--global-beat-burst",
key: "global_beat_burst",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--uds-rcvbuf-bytes",
key: "uds_rcvbuf_bytes",
kind: FlagKind::U32,
feature: "",
},
FlagSpec {
cli: "--iteration-budget-ms",
key: "iteration_budget_ms",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--scrape-budget-ms",
key: "scrape_budget_ms",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--heartbeat-file",
key: "heartbeat_file",
kind: FlagKind::Path,
feature: "",
},
FlagSpec {
cli: "--self-watchdog-secs",
key: "self_watchdog_secs",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--hw-watchdog",
key: "hw_watchdog",
kind: FlagKind::Path,
feature: "",
},
FlagSpec {
cli: "--shutdown-after-secs",
key: "shutdown_after_secs",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--shutdown-grace-ms",
key: "shutdown_grace_ms",
kind: FlagKind::U64,
feature: "",
},
FlagSpec {
cli: "--i-accept-plaintext-udp",
key: "i_accept_plaintext_udp",
kind: FlagKind::Bool,
feature: "unsafe-plaintext-udp",
},
FlagSpec {
cli: "--secure-udp-i-accept-recovery-on-unauthenticated-transport",
key: "i_accept_recovery_on_secure_udp",
kind: FlagKind::Bool,
feature: "",
},
FlagSpec {
cli: "--plaintext-udp-i-accept-recovery-on-unauthenticated-transport",
key: "i_accept_recovery_on_plaintext_udp",
kind: FlagKind::Bool,
feature: "",
},
FlagSpec {
cli: "--i-accept-secure-udp-non-loopback",
key: "i_accept_secure_udp_non_loopback",
kind: FlagKind::Bool,
feature: "",
},
FlagSpec {
cli: "--allow-cross-namespace-agents",
key: "allow_cross_namespace_agents",
kind: FlagKind::Bool,
feature: "",
},
FlagSpec {
cli: "--strict-namespace-check",
key: "strict_namespace_check",
kind: FlagKind::Bool,
feature: "",
},
FlagSpec {
cli: "--signal-handler-mode",
key: "signal_handler_mode",
kind: FlagKind::SignalHandlerMode,
feature: "",
},
FlagSpec {
cli: "--inject-wedge-ms",
key: "inject_wedge_ms",
kind: FlagKind::U64,
feature: "test-hooks",
},
];