Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSavePathMissing = &CodedError{Code: "studio.save_path_missing", Message: "studio save path is not configured"} ErrGraphRequired = &CodedError{Code: "studio.graph_required", Message: "graph is required"} ErrRunStateMissing = &CodedError{Code: "studio.run_state_missing", Message: "run-state repository is not configured"} ErrCheckpointMissing = &CodedError{Code: "studio.checkpoint_missing", Message: "checkpoint history is not configured"} ErrCompareRunsMissing = &CodedError{Code: "studio.compare_runs_missing", Message: "compare requires run_a and run_b"} ErrUnsupportedMode = &CodedError{Code: "studio.unsupported_mode", Message: "studio run supports fixed_workflow and hybrid scenarios"} ErrNodeIDRequired = &CodedError{Code: "obs.node_id_required", Message: "node_id is required"} ErrVersionRequired = &CodedError{Code: "obs.version_required", Message: "version must be a positive integer"} ErrStreamingUnsupported = &CodedError{Code: "obs.streaming_unsupported", Message: "streaming is not supported"} )
Functions ¶
func FormatMessage ¶
func FormatMessage(payload ErrorPayload) string
FormatMessage renders a developer-facing message for logs.
func WrapGraphError ¶
WrapGraphError converts graph import errors into coded errors when possible.
Types ¶
type CodedError ¶
CodedError is a Studio error with a stable machine-readable code.
func (*CodedError) Error ¶
func (e *CodedError) Error() string
type ErrorPayload ¶
type ErrorPayload struct {
Code string `json:"code"`
Message string `json:"message"`
Params map[string]string `json:"params,omitempty"`
}
ErrorPayload is the structured Studio API error body.
func ErrorPayloadFrom ¶
func ErrorPayloadFrom(err error) ErrorPayload
ErrorPayloadFrom maps an error to a structured Studio API payload.
type RunCompareResult ¶
type RunCompareResult struct {
RunA string `json:"run_a"`
RunB string `json:"run_b"`
StatusA runstate.RunStatus `json:"status_a"`
StatusB runstate.RunStatus `json:"status_b"`
StepsOnlyA []string `json:"steps_only_a"`
StepsOnlyB []string `json:"steps_only_b"`
}
RunCompareResult summarizes differences between two run snapshots.
func CompareSnapshots ¶
func CompareSnapshots(runA, runB string, a, b runstate.RunSnapshot) RunCompareResult
CompareSnapshots diffs step outputs between two run snapshots.
type StepDiff ¶
type StepDiff struct {
NodeID string `json:"node_id"`
Same bool `json:"same"`
OutputA json.RawMessage `json:"output_a,omitempty"`
OutputB json.RawMessage `json:"output_b,omitempty"`
}
StepDiff describes one workflow step output comparison.
Click to show internal directories.
Click to hide internal directories.