Skip to main content

Crate tailscale_cli

Crate tailscale_cli 

Source
Expand description

Wrapper around the tailscale command-line interface.

The local node is driven through its CLI rather than through the LocalAPI socket (ADR-0001), so this crate is where every one of those decisions lives: where the binary is found, what environment it inherits, how long it is given, how a secret reaches it without passing through the argument list, and which calls may overlap.

Everything above this crate sees LocalBackend, a one-method trait, so the server can be built over a fake in tests without spawning anything.

Re-exports§

pub use backend::BoxFuture;
pub use backend::Concurrency;
pub use backend::Invocation;
pub use backend::LocalBackend;
pub use backend::Output;
pub use backend::Unavailable;
pub use exec::CliBackend;
pub use exec::DEFAULT_TIMEOUT;
pub use exec::ExecError;
pub use exec::GRACE_PERIOD;
pub use secret::PrivateFile;
pub use secret::SecretFile;

Modules§

backend
What the rest of the server sees of the local node.
exec
Spawning the tailscale binary.
secret
Handing the CLI something too big or too private for an argument list.