Documentation
¶
Index ¶
- func NewWorkflowCmd(f client.NewClientFunc) *cobra.Command
- type DeleteParams
- type GetParams
- type ListParams
- type LogsParams
- type RunFilter
- type StartRunParams
- type Workflow
- func (w *Workflow) Delete(params DeleteParams) error
- func (w *Workflow) Get(params GetParams) error
- func (w *Workflow) List(params ListParams) error
- func (w *Workflow) Logs(params LogsParams) error
- func (w *Workflow) ResolveLatestRun(namespace, workflowName string, filter RunFilter) (string, error)
- func (w *Workflow) StartRun(params StartRunParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorkflowCmd ¶ added in v1.1.0
func NewWorkflowCmd(f client.NewClientFunc) *cobra.Command
Types ¶
type DeleteParams ¶ added in v1.0.0
DeleteParams defines parameters for deleting a single workflow
func (DeleteParams) GetNamespace ¶ added in v1.0.0
func (p DeleteParams) GetNamespace() string
func (DeleteParams) GetWorkflowName ¶ added in v1.0.0
func (p DeleteParams) GetWorkflowName() string
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
WorkflowKind string // optional; "ClusterWorkflow" or "Workflow" (defaults to "Workflow")
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 {
// contains filtered or unexported fields
}
Workflow implements workflow operations
func (*Workflow) Delete ¶ added in v1.0.0
func (w *Workflow) Delete(params DeleteParams) error
Delete deletes a single workflow
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) ResolveLatestRun ¶ added in v1.1.0
func (w *Workflow) ResolveLatestRun(namespace, workflowName string, filter RunFilter) (string, error)
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.
func (*Workflow) StartRun ¶ added in v0.17.0
func (w *Workflow) StartRun(params StartRunParams) error
StartRun starts a workflow run