tuicomponents

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunSteps

func RunSteps[T any](ctx context.Context, clients k8s.KubernetesClients, state *T, entrypoint RunStep[T]) error

RunSteps manages the step execution flow by navigating between the steps

Types

type RunState

type RunState struct {
	Workload               kaiwo.KaiwoWorkload
	WorkloadType           string
	User                   string
	Namespace              string
	PodName                string
	ContainerName          string
	PodSelectionPredicates []cliutils.PodSelectionPredicate
}

type RunStep

type RunStep[T any] func(context.Context, k8s.KubernetesClients, *T) (StepResult, RunStep[T], error)

RunStep provides a way to build multistep hierarchical terminal UIs The function returns a result of the step to indicate what should be done next, as well as an optional next RunStep to run

type StepResult

type StepResult string
var (
	StepResultOk       StepResult = "ok"
	StepResultErr      StepResult = "err"
	StepResultPrevious StepResult = "previous"
	StepResultQuit     StepResult = "quit"
)

func RunSelectTable

func RunSelectTable(data [][]string, columns []string, title string, clearAfterFinish bool) (int, StepResult, error)

Jump to

Keyboard shortcuts

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