pub struct Peer {Show 13 fields
pub device_id: Option<String>,
pub device_name: Option<String>,
pub display_name: String,
pub hostname: String,
pub tailscale_id: String,
pub peer_ref: String,
pub generation: u64,
pub ip: IpAddr,
pub online: bool,
pub ws_connected: bool,
pub connection_type: String,
pub os: Option<String>,
pub last_seen: Option<String>,
}Expand description
A peer as seen by application code (RFC 022 projection).
This is a simplified projection of the internal PeerState that hides
session-layer internals. Networking still accepts string queries today;
Phase B of RFC 022 will take handle-first parameters. Fields are already
honest: device_id is never a Tailscale-id fallback.
Fields§
§device_id: Option<String>Durable ULID once known and published; None until identity is learned
(or while suppressed under first-wins). Never equals tailscale_id.
device_name: Option<String>Human-readable device name from the hello identity block, if known.
display_name: StringBest label for UI: identity name → hostname with truffle-{appId}-
stripped when possible → short tailscale id.
hostname: StringLayer 3 Tailscale hostname (truffle-{appId}-{slug}).
tailscale_id: StringTailscale stable node ID — routing key and advanced diagnostics.
peer_ref: StringProcess-local ref {tailscale_id}:{generation} (RFC 022).
generation: u64Generation of this registry entry (bumped on re-join).
ip: IpAddrNetwork IP address.
online: boolWhether the peer is online (from Layer 3).
ws_connected: boolWhether there is an active envelope-bus WebSocket connection.
connection_type: StringConnection type description (e.g., "direct" or "relay:ord").
os: Option<String>Operating system, if known. Prefers the hello envelope’s value and falls back to Layer 3.
last_seen: Option<String>Last time the peer was seen online (RFC 3339 string).