component

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: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComponentCmd added in v1.1.0

func NewComponentCmd(f client.NewClientFunc) *cobra.Command

Types

type Component added in v0.17.0

type Component struct {
	// contains filtered or unexported fields
}

func New added in v0.17.0

func New(c client.Interface) *Component

func (*Component) Delete added in v0.17.0

func (cp *Component) Delete(params DeleteParams) error

Delete deletes a single component

func (*Component) Deploy added in v0.17.0

func (cp *Component) Deploy(params DeployParams) error

Deploy deploys or promotes a component

func (*Component) Exec added in v1.1.0

func (cp *Component) Exec(params ExecParams) error

Exec opens an interactive exec session to a component's running pod.

func (*Component) Get added in v0.17.0

func (cp *Component) Get(params GetParams) error

Get retrieves a single component and outputs it as YAML

func (*Component) List added in v0.17.0

func (cp *Component) List(params ListParams) error

List lists all components in a project

func (*Component) ListWorkflowRuns added in v0.17.0

func (cp *Component) ListWorkflowRuns(params ListWorkflowRunsParams) error

ListWorkflowRuns lists workflow runs filtered by component name.

func (*Component) Logs added in v0.17.0

func (cp *Component) Logs(params LogsParams) error

Logs fetches and displays logs for a component

func (*Component) Scaffold added in v0.17.0

func (cp *Component) Scaffold(params ScaffoldParams) error

Scaffold generates a scaffold YAML for a component based on its ComponentType and optional Traits and Workflow

func (*Component) StartWorkflow added in v0.17.0

func (cp *Component) StartWorkflow(params StartWorkflowParams) error

StartWorkflow gets the component, resolves its workflow name, and starts a workflow run.

func (*Component) WorkflowRunLogs added in v0.17.0

func (cp *Component) WorkflowRunLogs(params WorkflowRunLogsParams) error

WorkflowRunLogs fetches and displays logs for a component's workflow run. If RunName is provided, it delegates directly to workflowrun.Logs. Otherwise, it resolves the component's workflow and finds the latest run.

type DeleteParams added in v0.17.0

type DeleteParams struct {
	Namespace     string
	ComponentName string
}

DeleteParams defines parameters for deleting a single component

func (DeleteParams) GetComponentName added in v0.17.0

func (p DeleteParams) GetComponentName() string

func (DeleteParams) GetNamespace added in v0.17.0

func (p DeleteParams) GetNamespace() string

type DeployParams added in v0.17.0

type DeployParams struct {
	ComponentName string
	Namespace     string
	Project       string
	Release       string   // --release flag (optional release name)
	To            string   // --to flag (target env for promotion)
	Set           []string // --set values (type.path=value)
}

DeployParams defines parameters for deploying or promoting a component

func (DeployParams) GetComponentName added in v0.17.0

func (p DeployParams) GetComponentName() string

func (DeployParams) GetNamespace added in v0.17.0

func (p DeployParams) GetNamespace() string

func (DeployParams) GetProject added in v0.17.0

func (p DeployParams) GetProject() string

type ExecParams added in v1.1.0

type ExecParams struct {
	Namespace   string
	Project     string
	Component   string
	Environment string
	Container   string
	Command     []string // command to run; defaults to ["/bin/sh"] when empty
	TTY         bool
	Stdin       bool
}

ExecParams defines parameters for exec-ing into a component's running pod

func (ExecParams) GetComponentName added in v1.1.0

func (p ExecParams) GetComponentName() string

func (ExecParams) GetNamespace added in v1.1.0

func (p ExecParams) GetNamespace() string

type GetParams added in v0.17.0

type GetParams struct {
	Namespace     string
	ComponentName string
}

GetParams defines parameters for getting a single component

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
	Project   string
}

ListParams defines parameters for listing components

func (ListParams) GetNamespace added in v0.17.0

func (p ListParams) GetNamespace() string

type ListWorkflowRunsParams added in v0.17.0

type ListWorkflowRunsParams struct {
	Namespace     string
	ComponentName string
}

ListWorkflowRunsParams defines parameters for listing workflow runs by component

func (ListWorkflowRunsParams) GetComponentName added in v0.17.0

func (p ListWorkflowRunsParams) GetComponentName() string

func (ListWorkflowRunsParams) GetNamespace added in v0.17.0

func (p ListWorkflowRunsParams) GetNamespace() string

type LogsParams added in v0.17.0

type LogsParams struct {
	Namespace   string
	Project     string
	Component   string
	Environment string
	Follow      bool
	Since       string // duration like "1h", "30m", "5m"
	Tail        int    // number of lines to show from the end of logs (0 means no limit)
}

LogsParams defines parameters for fetching component logs

type ScaffoldParams added in v0.17.0

type ScaffoldParams struct {
	ComponentName        string
	ComponentType        string   // namespace-scoped, format: workloadType/componentTypeName
	ClusterComponentType string   // cluster-scoped, format: workloadType/componentTypeName
	Traits               []string // namespace-scoped trait names
	ClusterTraits        []string // cluster-scoped trait names
	WorkflowName         string   // namespace-scoped workflow name
	ClusterWorkflowName  string   // cluster-scoped workflow name
	Namespace            string
	ProjectName          string
	OutputPath           string
	SkipComments         bool // skip structural comments and field descriptions
	SkipOptional         bool // skip optional fields without defaults
}

ScaffoldParams defines parameters for scaffolding a component

type StartWorkflowParams added in v0.17.0

type StartWorkflowParams struct {
	Namespace     string
	ComponentName string
	Project       string
	Set           []string
}

StartWorkflowParams defines parameters for starting a component's workflow

func (StartWorkflowParams) GetComponentName added in v0.17.0

func (p StartWorkflowParams) GetComponentName() string

func (StartWorkflowParams) GetNamespace added in v0.17.0

func (p StartWorkflowParams) GetNamespace() string

type WorkflowRunLogsParams added in v0.17.0

type WorkflowRunLogsParams struct {
	Namespace     string
	ComponentName string
	RunName       string // optional --workflowrun flag; defaults to latest
	Follow        bool
	Since         string
}

WorkflowRunLogsParams defines parameters for fetching component workflow run logs

func (WorkflowRunLogsParams) GetComponentName added in v0.17.0

func (p WorkflowRunLogsParams) GetComponentName() string

func (WorkflowRunLogsParams) GetNamespace added in v0.17.0

func (p WorkflowRunLogsParams) GetNamespace() string

Jump to

Keyboard shortcuts

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