Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveLatestRun ¶ added in v0.17.0
ResolveLatestRun finds the most recent workflow run for the given workflow. An optional filter can narrow the results (e.g. exclude or include component runs). Pass nil for no filtering.
Types ¶
type GetParams ¶ added in v0.17.0
GetParams defines parameters for getting a single workflow
func (GetParams) GetNamespace ¶ added in v0.17.0
type ListParams ¶ added in v0.17.0
type ListParams struct {
Namespace string
}
ListParams defines parameters for listing workflows
func (ListParams) GetNamespace ¶ added in v0.17.0
func (p ListParams) GetNamespace() string
type LogsParams ¶ added in v0.17.0
type LogsParams struct {
Namespace string
WorkflowName string
RunName string // optional --workflowrun flag; defaults to latest
Follow bool
Since string
}
LogsParams defines parameters for getting workflow logs
func (LogsParams) GetNamespace ¶ added in v0.17.0
func (p LogsParams) GetNamespace() string
type RunFilter ¶ added in v0.17.0
type RunFilter func([]gen.WorkflowRun) []gen.WorkflowRun
RunFilter transforms a slice of workflow runs (e.g. to exclude/include certain runs).
type StartRunParams ¶ added in v0.17.0
type StartRunParams struct {
Namespace string
WorkflowName string
RunName string // optional; auto-generated if empty
Parameters map[string]interface{} // base parameters (e.g., from component workflow config)
Set []string // --set overrides applied on top of Parameters
Labels map[string]string // optional labels to attach to the workflow run
}
StartRunParams defines parameters for starting a workflow run
type Workflow ¶ added in v0.17.0
type Workflow struct{}
Workflow implements workflow operations
func (*Workflow) List ¶ added in v0.17.0
func (w *Workflow) List(params ListParams) error
List lists all workflows in a namespace.
func (*Workflow) Logs ¶ added in v0.17.0
func (w *Workflow) Logs(params LogsParams) error
Logs fetches and displays logs for a workflow. If RunName is provided, it delegates directly to workflowrun.Logs. Otherwise, it finds the latest workflow run and uses that.
func (*Workflow) StartRun ¶ added in v0.17.0
func (w *Workflow) StartRun(params StartRunParams) error
StartRun starts a workflow run