Documentation
¶
Index ¶
- Constants
- Variables
- type AttemptRecord
- type Result
- type ResultSource
- type Run
- func (o *Run) Decode(e entity.AttrGetter)
- func (o *Run) Empty() bool
- func (o *Run) Encode() (attrs []entity.Attr)
- func (o *Run) EntityId() entity.Id
- func (o *Run) InitSchema(sb *schema.SchemaBuilder)
- func (o *Run) Is(e entity.AttrGetter) bool
- func (o *Run) Kind() entity.Id
- func (o *Run) ShortKind() string
- type RunSlot
- func (o *RunSlot) Decode(e entity.AttrGetter)
- func (o *RunSlot) Empty() bool
- func (o *RunSlot) Encode() (attrs []entity.Attr)
- func (o *RunSlot) EntityId() entity.Id
- func (o *RunSlot) InitSchema(sb *schema.SchemaBuilder)
- func (o *RunSlot) Is(e entity.AttrGetter) bool
- func (o *RunSlot) Kind() entity.Id
- func (o *RunSlot) ShortKind() string
- type RunStatus
- type RunTrigger
Constants ¶
View Source
const ( RunAppId = entity.Id("dev.miren.run/run.app") RunAttemptId = entity.Id("dev.miren.run/run.attempt") RunAttemptRecordId = entity.Id("dev.miren.run/run.attempt_record") RunCancelRequestedAtId = entity.Id("dev.miren.run/run.cancel_requested_at") RunCommandId = entity.Id("dev.miren.run/run.command") RunEndedAtId = entity.Id("dev.miren.run/run.ended_at") RunMaxAttemptsId = entity.Id("dev.miren.run/run.max_attempts") RunQueuedAtId = entity.Id("dev.miren.run/run.queued_at") RunResultId = entity.Id("dev.miren.run/run.result") RunSandboxId = entity.Id("dev.miren.run/run.sandbox") RunStartedAtId = entity.Id("dev.miren.run/run.started_at") RunStatusId = entity.Id("dev.miren.run/run.status") RunStatusPendingId = entity.Id("dev.miren.run/status.pending") RunStatusRunningId = entity.Id("dev.miren.run/status.running") RunStatusSucceededId = entity.Id("dev.miren.run/status.succeeded") RunStatusFailedId = entity.Id("dev.miren.run/status.failed") RunStatusTimedOutId = entity.Id("dev.miren.run/status.timed_out") RunStatusCanceledId = entity.Id("dev.miren.run/status.canceled") RunStatusSkippedId = entity.Id("dev.miren.run/status.skipped") RunTaskId = entity.Id("dev.miren.run/run.task") RunTickId = entity.Id("dev.miren.run/run.tick") RunTimeoutId = entity.Id("dev.miren.run/run.timeout") RunTriggerId = entity.Id("dev.miren.run/run.trigger") RunTriggerDeployId = entity.Id("dev.miren.run/trigger.deploy") RunTriggerScheduleId = entity.Id("dev.miren.run/trigger.schedule") RunTriggerManualId = entity.Id("dev.miren.run/trigger.manual") RunTtyId = entity.Id("dev.miren.run/run.tty") RunVersionId = entity.Id("dev.miren.run/run.version") )
View Source
const ( AttemptRecordAttemptId = entity.Id("dev.miren.run/attempt_record.attempt") AttemptRecordEndedAtId = entity.Id("dev.miren.run/attempt_record.ended_at") AttemptRecordExitCodeId = entity.Id("dev.miren.run/attempt_record.exit_code") AttemptRecordSandboxId = entity.Id("dev.miren.run/attempt_record.sandbox") AttemptRecordStartedAtId = entity.Id("dev.miren.run/attempt_record.started_at") AttemptRecordStatusId = entity.Id("dev.miren.run/attempt_record.status") )
View Source
const ( ResultAtId = entity.Id("dev.miren.run/result.at") ResultCodeId = entity.Id("dev.miren.run/result.code") ResultSourceId = entity.Id("dev.miren.run/result.source") ResultSourceTaskId = entity.Id("dev.miren.run/source.task") ResultSourceExecId = entity.Id("dev.miren.run/source.exec") )
Variables ¶
View Source
var ( KindRun = entity.Id("dev.miren.run/kind.run") KindRunSlot = entity.Id("dev.miren.run/kind.run_slot") Schema = entity.Id("dev.miren.run/schema.v1alpha") )
View Source
var ResultsourceFromId = map[entity.Id]ResultSource{ResultSourceTaskId: TASK, ResultSourceExecId: EXEC}
View Source
var ResultsourceToId = map[ResultSource]entity.Id{TASK: ResultSourceTaskId, EXEC: ResultSourceExecId}
Functions ¶
This section is empty.
Types ¶
type AttemptRecord ¶
type AttemptRecord struct {
Attempt int64 `cbor:"attempt" json:"attempt"`
EndedAt time.Time `cbor:"ended_at,omitempty" json:"ended_at"`
ExitCode int64 `cbor:"exit_code" json:"exit_code"`
Sandbox entity.Id `cbor:"sandbox,omitempty" json:"sandbox,omitempty"`
StartedAt time.Time `cbor:"started_at,omitempty" json:"started_at"`
Status string `cbor:"status,omitempty" json:"status,omitempty"`
}
func (*AttemptRecord) Decode ¶
func (o *AttemptRecord) Decode(e entity.AttrGetter)
func (*AttemptRecord) Empty ¶
func (o *AttemptRecord) Empty() bool
func (*AttemptRecord) Encode ¶
func (o *AttemptRecord) Encode() (attrs []entity.Attr)
func (*AttemptRecord) InitSchema ¶
func (o *AttemptRecord) InitSchema(sb *schema.SchemaBuilder)
type Result ¶
type Result struct {
At time.Time `cbor:"at,omitempty" json:"at"`
Code int64 `cbor:"code" json:"code"`
Source ResultSource `cbor:"source,omitempty" json:"source,omitempty"`
}
func (*Result) Decode ¶
func (o *Result) Decode(e entity.AttrGetter)
func (*Result) InitSchema ¶
func (o *Result) InitSchema(sb *schema.SchemaBuilder)
type ResultSource ¶
type ResultSource string
const ( TASK ResultSource = "source.task" EXEC ResultSource = "source.exec" )
type Run ¶
type Run struct {
ID entity.Id `json:"id"`
App entity.Id `cbor:"app,omitempty" json:"app,omitempty"`
Attempt int64 `cbor:"attempt,omitempty" json:"attempt,omitempty"`
AttemptRecord []AttemptRecord `cbor:"attempt_record,omitempty" json:"attempt_record,omitempty"`
CancelRequestedAt time.Time `cbor:"cancel_requested_at,omitempty" json:"cancel_requested_at"`
Command string `cbor:"command,omitempty" json:"command,omitempty"`
EndedAt time.Time `cbor:"ended_at,omitempty" json:"ended_at"`
MaxAttempts int64 `cbor:"max_attempts,omitempty" json:"max_attempts,omitempty"`
QueuedAt time.Time `cbor:"queued_at,omitempty" json:"queued_at"`
Result Result `cbor:"result,omitempty" json:"result"`
Sandbox entity.Id `cbor:"sandbox,omitempty" json:"sandbox,omitempty"`
StartedAt time.Time `cbor:"started_at,omitempty" json:"started_at"`
Status RunStatus `cbor:"status,omitempty" json:"status,omitempty"`
Task string `cbor:"task,omitempty" json:"task,omitempty"`
Tick string `cbor:"tick,omitempty" json:"tick,omitempty"`
Timeout string `cbor:"timeout,omitempty" json:"timeout,omitempty"`
Trigger RunTrigger `cbor:"trigger,omitempty" json:"trigger,omitempty"`
Tty bool `cbor:"tty,omitempty" json:"tty,omitempty"`
Version entity.Id `cbor:"version,omitempty" json:"version,omitempty"`
}
func (*Run) Decode ¶
func (o *Run) Decode(e entity.AttrGetter)
func (*Run) InitSchema ¶
func (o *Run) InitSchema(sb *schema.SchemaBuilder)
type RunSlot ¶
type RunSlot struct {
ID entity.Id `json:"id"`
AcquiredAt time.Time `cbor:"acquired_at,omitempty" json:"acquired_at"`
App entity.Id `cbor:"app,omitempty" json:"app,omitempty"`
Run entity.Id `cbor:"run,omitempty" json:"run,omitempty"`
Task string `cbor:"task,omitempty" json:"task,omitempty"`
}
func (*RunSlot) Decode ¶
func (o *RunSlot) Decode(e entity.AttrGetter)
func (*RunSlot) InitSchema ¶
func (o *RunSlot) InitSchema(sb *schema.SchemaBuilder)
type RunTrigger ¶
type RunTrigger string
const ( DEPLOY RunTrigger = "trigger.deploy" SCHEDULE RunTrigger = "trigger.schedule" MANUAL RunTrigger = "trigger.manual" )
Click to show internal directories.
Click to hide internal directories.