pub struct Lease {Show 15 fields
pub id: LeaseId,
pub holder: Holder,
pub kind: LeaseKind,
pub state: LeaseState,
pub class: Option<JobClass>,
pub profile: JobProfile,
pub label: String,
pub cwd: String,
pub requested_at_ms: i64,
pub granted_at_ms: Option<i64>,
pub ended_at_ms: Option<i64>,
pub expires_at_ms: i64,
pub end_cause: Option<EndCause>,
pub binding: Option<LeaseBinding>,
pub isolation: Option<LeaseIsolation>,
}Expand description
A reservation of machine resources for one job.
Fields§
§id: LeaseIdLease ID.
holder: HolderSession that owns the lease.
kind: LeaseKindHow the lease shares the machine.
state: LeaseStateLifecycle state.
class: Option<JobClass>Class the profile was taken from, or None for a custom profile.
profile: JobProfileResources reserved while the lease is active.
label: StringWhat the lease is for, usually the command that will run.
cwd: StringWorking directory of the command, or empty when the requester did not say.
requested_at_ms: i64When the lease was requested, in milliseconds since the Unix epoch.
granted_at_ms: Option<i64>When the lease became active.
ended_at_ms: Option<i64>When the lease was released or expired.
expires_at_ms: i64When the lease expires unless a heartbeat arrives first.
end_cause: Option<EndCause>Why the lease ended; None while it is queued or active, and for leases that ended
before causes were recorded.
binding: Option<LeaseBinding>The command the lease’s holder last reported running under it; None until the hook
reports one.
isolation: Option<LeaseIsolation>How the lease’s command is kept apart from the rest of the machine; None where allotd
does not report it, as on Windows.