pub struct Host {
pub id: HostId,
pub display_name: String,
pub os: Os,
pub architecture: Arch,
pub host_capacity: NonZeroU16,
pub service_start_mode: StartMode,
pub refresh_interval: RefreshInterval,
pub runner_root_override: Option<LocalAbsolutePath>,
pub created_at: Timestamp,
}Expand description
One machine running one agent.
host_capacity is the ceiling on concurrent runner attempts across every
policy on this machine (D9). It is a NonZeroU16 because a host that
declares zero capacity is not a configured host, it is a disabled one, and
the two should not be spelled the same way. crate::capacity::HostAllocator
is the only thing that spends it.
Fields§
§id: HostId§display_name: String§os: Os§architecture: Arch§host_capacity: NonZeroU16§service_start_mode: StartMode§refresh_interval: RefreshInterval§runner_root_override: Option<LocalAbsolutePath>Where disposable runner attempts are created, when the operator has said (D2).
None means “use the platform default”, which is resolved at runtime by
b1 and shown as platform-default rather than baked into the row.
02-target-architecture.md: “Storing only the override allows a future
platform-default correction without rewriting every database” — a stored
C:\rman would silently become the operator’s explicit choice the day
the default moves.
This is runner placement and not application data: config, SQLite,
logs, diagnostics and the verified package cache stay under AppPaths,
and --data-dir continues to move those and only those (invariant 1).
created_at: TimestampImplementations§
Source§impl Host
impl Host
Sourcepub fn new(
id: HostId,
display_name: impl AsRef<str>,
os: Os,
architecture: Arch,
host_capacity: NonZeroU16,
created_at: Timestamp,
) -> Result<Self, ValidationError>
pub fn new( id: HostId, display_name: impl AsRef<str>, os: Os, architecture: Arch, host_capacity: NonZeroU16, created_at: Timestamp, ) -> Result<Self, ValidationError>
§Errors
An empty display name.
pub fn host_capacity(&self) -> u16
Sourcepub const fn has_configured_runner_root(&self) -> bool
pub const fn has_configured_runner_root(&self) -> bool
Whether the runner root came from the operator rather than the platform.
D11 requires CLI and TUI to show “the effective path [and] configured
source”; the effective path needs b1’s platform default, but which of
the two sources produced it is decidable here, with no I/O.