Documentation
¶
Index ¶
Constants ¶
View Source
const ClaimsSchemaVersion = 2
View Source
const LegacySchemaVersion = 1
View Source
const PreemptionSchemaVersion = 3
View Source
const SchemaVersion = 4
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Claim ¶
type Claim struct {
JobName string `json:"job_name"`
InstanceName string `json:"instance_name"`
ControllerID string `json:"controller_id"`
PoolID string `json:"pool_id"`
PoolName string `json:"pool_name"`
ImageFingerprint string `json:"image_fingerprint"`
State ClaimState `json:"state"`
ReservedAt time.Time `json:"reserved_at"`
UpdatedAt time.Time `json:"updated_at"`
ExpiresAt time.Time `json:"expires_at"`
}
Claim binds one GARM runner identity to one pre-booted, unregistered VM. The binding is persisted before any job credential crosses the Incus API. InstanceName is the provider ID returned to GARM; JobName is GARM's stable retry identity and therefore the map key.
type ClaimState ¶
type ClaimState string
const ( ClaimReserved ClaimState = "reserved" ClaimInjected ClaimState = "injected" )
type Journal ¶
type Lease ¶
type Lease struct {
InstanceName string `json:"instance_name"`
ControllerID string `json:"controller_id"`
PoolID string `json:"pool_id"`
PoolName string `json:"pool_name"`
VCPU int `json:"vcpu"`
MemoryMiB int `json:"memory_mib"`
ImageFingerprint string `json:"image_fingerprint"`
State LeaseState `json:"state"`
// PreemptedBy durably binds speculative warm capacity to the admitted cold
// request that is replacing it. It is set before VM teardown, so a warm
// claim or replenishment process cannot race into the capacity hand-off.
// State remains the observed lifecycle state until teardown actually starts;
// MarkDeleting then moves it to StateDeleting.
PreemptedBy string `json:"preempted_by,omitempty"`
AdmittedAt time.Time `json:"admitted_at"`
UpdatedAt time.Time `json:"updated_at"`
ExpiresAt time.Time `json:"expires_at"`
}
type LeaseState ¶
type LeaseState string
const ( StateAdmitted LeaseState = "admitted" StateCreated LeaseState = "created" StateDeleting LeaseState = "deleting" StateWarmReady LeaseState = "warm-ready" StateWarmClaimed LeaseState = "warm-claimed" )
type MaintenanceReconcileResult ¶
type Store ¶
func (Store) ReadOnly ¶
ReadOnly observes one atomically published journal generation without opening or creating the lock file. Store updates are fsync+rename based, so a reader sees either the complete previous generation or the complete next generation. This path is for sandboxed telemetry processes that have no write access to the journal directory; lifecycle mutations must use Update.
Click to show internal directories.
Click to hide internal directories.