Documentation
¶
Index ¶
- Variables
- type BuildInfoMetrics
- type Task
- type TaskAssignee
- type TaskContent
- type TaskFrontmatter
- func (f TaskFrontmatter) Assignee() TaskAssignee
- func (f TaskFrontmatter) CurrentJob() string
- func (f TaskFrontmatter) MaxRetries() int
- func (f TaskFrontmatter) Phase() *domain.TaskPhase
- func (f TaskFrontmatter) RetryCount() int
- func (f TaskFrontmatter) SpawnNotification() bool
- func (f TaskFrontmatter) Stage() string
- func (f TaskFrontmatter) Status() domain.TaskStatus
- type TaskIdentifier
- type TaskIdentifierGenerator
- type TaskIdentifiers
Constants ¶
This section is empty.
Variables ¶
var CDBSchemaIDs = cdb.SchemaIDs{ TaskV1SchemaID, }
var TaskV1SchemaID = cdb.SchemaID{
Group: "agent",
Kind: "task",
Version: "v1",
}
Functions ¶
This section is empty.
Types ¶
type BuildInfoMetrics ¶
func NewBuildInfoMetrics ¶
func NewBuildInfoMetrics() BuildInfoMetrics
type Task ¶
type Task struct {
base.Object[base.Identifier]
TaskIdentifier TaskIdentifier `json:"taskIdentifier"`
Frontmatter TaskFrontmatter `json:"frontmatter"`
Content TaskContent `json:"content"`
}
Task is the payload published by an agent when it finishes a task. task/controller consumes this from agent-task-v1-request and writes it to the vault file. Frontmatter is a generic map — task/controller serializes it to YAML without interpreting individual fields. Content is the markdown body after the frontmatter closing delimiter. The agent owns the content transformation (status, phase, Result section, etc.).
type TaskAssignee ¶
type TaskAssignee string
TaskAssignee identifies which agent type handles this task. Matched against Config CRD spec.assignee.
func (TaskAssignee) String ¶
func (t TaskAssignee) String() string
type TaskContent ¶
type TaskContent string
TaskContent is the markdown body of a task after the frontmatter closing delimiter.
func (TaskContent) String ¶
func (t TaskContent) String() string
type TaskFrontmatter ¶
type TaskFrontmatter map[string]interface{}
TaskFrontmatter is a generic map of frontmatter key-value pairs. Serializable as JSON (Kafka) and YAML (vault file). Typed accessors provide type-safe access to well-known fields.
func (TaskFrontmatter) Assignee ¶
func (f TaskFrontmatter) Assignee() TaskAssignee
func (TaskFrontmatter) CurrentJob ¶ added in v0.37.0
func (f TaskFrontmatter) CurrentJob() string
CurrentJob returns the K8s Job name recorded when the executor spawned a Job for this task. Returns an empty string when not set.
func (TaskFrontmatter) MaxRetries ¶ added in v0.37.0
func (f TaskFrontmatter) MaxRetries() int
MaxRetries returns the maximum number of failures allowed before escalation. Returns 3 when the field is absent (spec default).
func (TaskFrontmatter) Phase ¶
func (f TaskFrontmatter) Phase() *domain.TaskPhase
func (TaskFrontmatter) RetryCount ¶ added in v0.37.0
func (f TaskFrontmatter) RetryCount() int
RetryCount returns the number of failed attempts recorded in frontmatter. Returns 0 when the field is absent.
func (TaskFrontmatter) SpawnNotification ¶ added in v0.37.0
func (f TaskFrontmatter) SpawnNotification() bool
SpawnNotification returns true when this result is a job-spawn tracking update rather than an agent outcome. The controller skips the retry counter for these.
func (TaskFrontmatter) Stage ¶
func (f TaskFrontmatter) Stage() string
Stage returns the execution stage from the "stage" key. Returns "prod" if the key is absent or empty.
func (TaskFrontmatter) Status ¶
func (f TaskFrontmatter) Status() domain.TaskStatus
type TaskIdentifier ¶
type TaskIdentifier string
TaskIdentifier uniquely identifies an agent task.
func (TaskIdentifier) Bytes ¶
func (t TaskIdentifier) Bytes() []byte
func (TaskIdentifier) Equal ¶
func (t TaskIdentifier) Equal(identifier base.ObjectIdentifier) bool
func (TaskIdentifier) Ptr ¶
func (t TaskIdentifier) Ptr() *TaskIdentifier
func (TaskIdentifier) String ¶
func (t TaskIdentifier) String() string
type TaskIdentifierGenerator ¶
type TaskIdentifierGenerator base.IdentifierGenerator[TaskIdentifier]
TaskIdentifierGenerator generates unique task identifiers.
type TaskIdentifiers ¶
type TaskIdentifiers []TaskIdentifier
TaskIdentifiers is a slice of TaskIdentifier.
func (TaskIdentifiers) Contains ¶
func (t TaskIdentifiers) Contains(value TaskIdentifier) bool
Contains returns true if the slice contains the given identifier.