Documentation
¶
Overview ¶
Package executions reads a workflow's run history out of its message traces. A run is one triggering message: its trace is the run, its steps are the run's steps. Nothing is stored here; it is a view over the traces store, so retention, sampling and storage backends are the traces' own.
Index ¶
Constants ¶
View Source
const ( // StatusSucceeded: no step recorded an error. StatusSucceeded = "succeeded" // StatusFailed: at least one step recorded an error. StatusFailed = "failed" // StatusWaiting: nothing failed and the run's last step is an approval, // so the message is held until someone decides. StatusWaiting = "waiting" )
Run statuses.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Execution ¶
type Execution struct {
RunID string `json:"run_id"`
WorkflowID string `json:"workflow_id"`
StartedAt time.Time `json:"started_at"`
DurationMs int64 `json:"duration_ms"`
Status string `json:"status"`
StepCount int `json:"step_count"`
ErrorCount int `json:"error_count"`
AI genai.Usage `json:"ai"`
Steps []Step `json:"steps"`
}
Execution is one run of a workflow.
type Step ¶
type Step struct {
NodeID string `json:"node_id"`
NodeType string `json:"node_type,omitempty"`
Label string `json:"label,omitempty"`
Timestamp time.Time `json:"timestamp"`
DurationMs int64 `json:"duration_ms"`
Error string `json:"error,omitempty"`
// AI is the language model usage of this step's own calls.
AI genai.Usage `json:"ai"`
// Output is the message as the step left it; only on a single run.
Output map[string]any `json:"output,omitempty"`
}
Step is one node's part in a run.
Directories
¶
| Path | Synopsis |
|---|---|
|
transport
|
|
|
http
Package http serves a workflow's runs: running it once with a payload the user supplies, and (see executions.go) its run history.
|
Package http serves a workflow's runs: running it once with a payload the user supplies, and (see executions.go) its run history. |
Click to show internal directories.
Click to hide internal directories.