#[non_exhaustive]pub struct Machine {Show 26 fields
pub name: String,
pub location: String,
pub sample_time: Option<Timestamp>,
pub cpu_used_cores: f64,
pub cpu_total_cores: f64,
pub memory_used_bytes: u64,
pub memory_total_bytes: u64,
pub disk_used_bytes: u64,
pub disk_total_bytes: u64,
pub disk_usage: Option<DiskUsage>,
pub hostname: String,
pub ssh_host_key_fingerprint: String,
pub ssh_keys: Vec<SshKey>,
pub backups_enabled: bool,
pub snapshot_list_time: Option<Timestamp>,
pub snapshot_list_failure_message: String,
pub backup_retention_hours: u32,
pub acme_enabled: bool,
pub apps_domain: String,
pub daemon_version: String,
pub docker_version: String,
pub boot_time: Option<Timestamp>,
pub restart_required_time: Option<Timestamp>,
pub scheduled_restart_time: Option<Timestamp>,
pub sessions: Vec<MachineSession>,
pub alert_channels: Vec<AlertDestination>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIts plan’s name, e.g. "Starter".
location: StringWhere it runs, e.g. "Europe". Empty = not known.
sample_time: Option<Timestamp>When the figures below were read.
cpu_used_cores: f64By projects and builds.
cpu_total_cores: f64§memory_used_bytes: u64Without page cache, as docker stats counts.
memory_total_bytes: u64The machine’s, less a reserve for the system.
disk_used_bytes: u64The projects' disk. The operating system has its own partition outside it, and the machine’s own files are left out: a new machine uses 0.
disk_total_bytes: u64§disk_usage: Option<DiskUsage>§hostname: StringThe machine’s name: what the person’s own domains point at (a CNAME), and where they log in to a service’s container (Service::ssh_command). Client::create_transfer's URLs are on it as well, and no route can take it.
ssh_host_key_fingerprint: String"SHA256:...", to check on the first connection.
ssh_keys: Vec<SshKey>The person’s public keys: each logs in to every container. Empty = none yet: nobody can log in until RunMachineActionRequestAction::AddSshKey adds one.
backups_enabled: boolTrue = every project is backed up nightly, and on demand. False, always written = nothing is backed up: there are no snapshots, and a deleted project or volume is gone for good.
snapshot_list_time: Option<Timestamp>When the machine last read the backup repository’s list of snapshots whole. Absent = not yet (snapshot_list_failure_message says why, once a read failed), or backups are off: snapshot counts, Volume::last_backup_time, Project::snapshots and GetMachineResponse::deleted_projects are then not known, rather than none.
snapshot_list_failure_message: StringWhy the machine could not read that list, while backups are on and snapshot_list_time is absent: the backup repository’s error, e.g. a wrong password or a host that does not answer. The machine keeps trying. Empty = no read has failed, or the list is known, or backups are off.
backup_retention_hours: u32Snapshots are pruned once they are this many hours older than their project’s newest. 0 = kept forever: nothing deletes them.
acme_enabled: boolTrue = a host that no certificate installed on the machine covers gets one from Let’s Encrypt once it resolves to the machine. False, always written = such a host serves plain HTTP only.
apps_domain: StringThe person’s domain on Pethost, e.g. "sam.pethost.app": theirs alone, so "my domain" or "my Pethost domain" means this one unless they name another. A route’s host <name>.<apps_domain>, or apps_domain itself, works at once over HTTPS, with no DNS record to make, and a web port a project publishes gets such a host by itself (Client::create_project). Only the person changes it, in the panel’s settings. Empty = there is none: every host is a domain the person owns, and published ports all open on the machine.
daemon_version: String§docker_version: String§boot_time: Option<Timestamp>§restart_required_time: Option<Timestamp>When an update started to need a machine restart. Absent = none is needed.
scheduled_restart_time: Option<Timestamp>When RunMachineActionRequestAction::RestartMachine will restart it; later while what it waits for is still going on (RestartMachineAction::interrupt_operations). Absent = not scheduled.
sessions: Vec<MachineSession>What people have open in the containers now, oldest first: at most 100, the most the machine holds at once.
alert_channels: Vec<AlertDestination>Where Pethost tells the person of incidents: the account’s channels that are on, email first, then the oldest. The person sets them in the panel’s Settings → Alerts; no tool does. Empty = alerts reach nobody.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Machine
From the API’s JSON. A field this version does not know is refused, as the API
refuses one it does not have.
impl<'de> Deserialize<'de> for Machine
From the API’s JSON. A field this version does not know is refused, as the API refuses one it does not have.
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Serialize for Machine
As the API’s JSON: the proto’s field names, an enum as its value’s name, a 64-bit
integer as a string, a time as RFC 3339, bytes as base64.
impl Serialize for Machine
As the API’s JSON: the proto’s field names, an enum as its value’s name, a 64-bit integer as a string, a time as RFC 3339, bytes as base64.