workflow

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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

type DeleteParams struct {
	Namespace    string
	WorkflowName string
}

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

type GetParams struct {
	Namespace    string
	WorkflowName string
}

GetParams defines parameters for getting a single workflow

func (GetParams) GetNamespace added in v0.17.0

func (p GetParams) GetNamespace() string

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 New added in v0.17.0

func New(c client.Interface) *Workflow

New creates a new workflow implementation

func (*Workflow) Delete added in v1.0.0

func (w *Workflow) Delete(params DeleteParams) error

Delete deletes a single workflow

func (*Workflow) Get added in v0.17.0

func (w *Workflow) Get(params GetParams) error

Get retrieves a single workflow and outputs it as YAML

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL