Documentation
¶
Overview ¶
Package domain holds neutral types shared across components.
Index ¶
Constants ¶
const RunnerNamePrefix = "ushr-"
RunnerNamePrefix identifies jobs served by this fleet.
const RunnerNameSuffixLength = 26
RunnerNameSuffixLength leaves room for a 32-character host in GitHub’s 64-character runner name.
Variables ¶
This section is empty.
Functions ¶
func LabelsSatisfied ¶
LabelsSatisfied reports whether every label a job requires is advertised by a runner. Case-insensitive: GitHub preserves the case a workflow wrote and an operator's config rarely matches it.
Both the control plane (deciding what to offer an agent) and the agent (deciding what is worth reporting) must apply the same test — an agent that reports work it can never be offered leaks that work into its queue forever, because nothing but running a job to completion clears an entry.
func RandomName ¶
RandomName keeps short names for local runtime resources.
func RunnerName ¶
RunnerName identifies an attempt; retries must never overwrite an earlier attempt's telemetry.
func SplitRepoScope ¶
SplitRepoScope splits an "owner/repo" scope. ok is false for an org scope (a '/' is legal in neither an org login nor a bare repo name).
Types ¶
type Job ¶
type Job struct {
// Org is the tenant scope: a GitHub org login, or "owner/repo" for a
// repo-scoped target (personal accounts have no org-level runner pool, so
// their runners are per-repo). Everything downstream — dispatch dedup, the
// enrollment-token grant set, tenant matching — treats it as an opaque
// string; only the agent's GitHub calls interpret org vs repo. See SplitRepoScope.
Org string
Repo string
RunID int64
JobID int64
Labels []string
QueuedAt time.Time
// PassStart, when set, makes this a pass marker that carries no work: the
// source finished a clean pass over Org that began at PassStart, and has
// already sent every job still queued there. A job the consumer last
// received before PassStart is no longer queued.
PassStart time.Time
}
Job is a queued unit of work that needs a runner.