ts_control_serde/debug.rs
1use core::time::Duration;
2
3use serde::Deserialize;
4
5/// Deprecated. A miscellaneous set of declarative debug config changes and imperative debug
6/// commands sent from the control server to a Tailscale node. They've since been mostly
7/// migrated to node attributes in [`Node::capabilities`][crate::Node::capabilities] for
8/// the declarative things and control-to-node (c2n) requests for the imperative things.
9/// Not much remains here; don't add more.
10#[serde_with::serde_as]
11#[derive(Default, Debug, Clone, Deserialize)]
12#[serde(rename_all = "PascalCase", default)]
13pub struct Debug {
14 /// Requests that this Tailscale node sleep for the provided number of seconds.
15 ///
16 /// The node can (and should) limit the maximum time, such as 5 minutes. This exists as a
17 /// safety measure to slow down spinning Tailscale nodes, in case we introduce a bug in the
18 /// state machine.
19 #[serde_as(as = "serde_with::DurationSeconds<f64>")]
20 pub sleep_seconds: Duration,
21
22 /// Disables the `logtail` package in the Go client; ignored by the Rust client. Primarily
23 /// used by self-hosted control planes.
24 pub disable_log_tail: bool,
25
26 /// If populated, indicates that this Tailscale node's process should exit with the given
27 /// return code. This is a safety measure in case a node is crash-looping or in an unsafe
28 /// state and we need to remotely shut it down.
29 pub exit: Option<i64>,
30}