Documentation
¶
Index ¶
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) Phase ¶
func (f TaskFrontmatter) Phase() *domain.TaskPhase
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.