Documentation
¶
Index ¶
Constants ¶
const ( HealthActionRestart = iota HealthActionSignal )
Variables ¶
This section is empty.
Functions ¶
func CheckNoCycle ¶
CheckNoCycle rejects a spec whose dependency chain loops back to itself through live specs. Unknown IDs have no dependencies, so only known specs participate; the existing graph is assumed acyclic because every submit passed this same check.
Types ¶
type FileRef ¶
FileRef points at one file's content in the registry: the container path it materializes to, the blob digest holding its bytes, and the file mode (0 means 0600).
type HealthAction ¶
type HealthAction int
type HealthProbe ¶
type HealthProbe string
HealthProbe selects how the fast beat checks a workload: an HTTP endpoint, a TCP connect, or a command run inside the container. Empty means HTTP, so specs written before probes existed behave exactly as they always did.
const ( HealthProbeHTTP HealthProbe = "http" HealthProbeTCP HealthProbe = "tcp" HealthProbeExec HealthProbe = "exec" )
type QoS ¶
type QoS string
QoS is a workload's compute allocation class. Higher ranks place first and displace lower ones; displacement flows strictly downward, so eviction loops cannot form.
type RestartPolicy ¶
type RestartPolicy string
const ( RestartNever RestartPolicy = "never" RestartAlways RestartPolicy = "always" RestartOnFailure RestartPolicy = "on_failure" )
type Spec ¶
type Spec struct {
Image string // OCI reference, e.g. "docker.io/nginx:latest".
Restart RestartPolicy
Command []string // entrypoint override.
Env map[string]string
Resources Resources
ID uuid.UUID
AssignedNodeID uuid.UUID `json:"AssignedNodeID"` // which node is assigned to run this.
// AssignmentEpoch counts reassignments of one workload ID. Higher wins
// in the view so an orphan move always supersedes the stored copy.
AssignmentEpoch uint64
Removed bool
HostPort uint16
ContainerPort uint16
// StopTimeoutSeconds specifies the maximum time (in seconds) allowed for graceful
// process shutdown via SIGTERM before falling back to SIGKILL. Defaults to 60 seconds if <= 0.
StopTimeoutSeconds int
HealthAction HealthAction
HealthPath string // HTTP path for health check endpoint (defaults to "/health").
// HealthProbe selects the check type: http, tcp, or exec. Empty
// means http.
HealthProbe HealthProbe
// HealthCommand is the argv run inside the container for exec
// probes. Required when HealthProbe is exec, ignored otherwise.
HealthCommand []string
// DependsOn lists workload IDs that must be running on the same node
// before this workload starts. Unknown, removed, or elsewhere-assigned
// IDs are ignored, never waited on. Empty means no ordering.
DependsOn []uuid.UUID
// Files lists content-addressed files materialized into the container
// filesystem before start. Blobs live in the registry under the
// concord-files repo; the journal carries only these pointers.
Files []FileRef
// QoS ranks the workload for placement order and preemption:
// best-effort gives way to everything, guaranteed gives way to
// nothing. Empty means best-effort. This is compute allocation
// (who gets the node), not message delivery: ROS-style DDS QoS
// governs packets, this governs placement. See docs/qos.md.
QoS QoS
}
type Unhealthy ¶
Unhealthy is the payload of a workload.unhealthy event: the signal action's falling edge. It names the workload so the event converges fleet-wide with the subject attached; an empty payload could never say which workload went sick. Keys stay Go-case like every other journal payload (Spec, Instance), not the SDK's snake_case.