Documentation
¶
Overview ¶
Package taskid derives Task names from idempotency keys (§1, §4): the first 8 characters of the lowercase, unpadded RFC 4648 base32 of sha256(key), so [a-z2-7]{8} as C2 requires. The names are the dedup, so a key's format never changes between releases.
Index ¶
- func CoordinationChildKey(parent, childID string, version, generation int) string
- func CoordinationIntegrationKey(parent, purpose, manifestHash string, attempt int) string
- func IssueKey(repo string, number, gen int) string
- func Name(key string) string
- func Random() string
- func Run(task string, n int) string
- func RunloreKey(alert, resourceRef string) string
- func ScheduleKey(name string, at time.Time) string
- func SplitKey(parent string, k int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoordinationChildKey ¶ added in v0.39.0
CoordinationChildKey keys one generation of a coordination child (v4 MR2): one Task per parent, child, plan version and generation, whatever replays. Generation 1 is a child's first.
func CoordinationIntegrationKey ¶ added in v0.39.0
CoordinationIntegrationKey keys one integration attempt of a coordination parent (v4 MR10): its purpose, the hash of its immutable manifest and its attempt number, so another subject byte is another Task and a replay of the same attempt creates nothing twice.
func IssueKey ¶
IssueKey is an issue task's key; gen counts every factory/ready label event on the issue (R4).
func Random ¶
func Random() string
Random is a fresh C2 id for a run or a brief's nonce: 5 random bytes are exactly 8 base32 characters.
func Run ¶
Run is the deterministic id of task's nth run (R48). The reconciler names its claims and reservations with it; the meter recognises a Queued task's next run by it (#55).
func RunloreKey ¶
RunloreKey dedups "while a task for it is open" (§1): the caller checks openness.
func ScheduleKey ¶
ScheduleKey is a scheduled task's key: one per schedule and firing time, in UTC.
Types ¶
This section is empty.