executor

package
v0.0.0-...-6cc527e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedResults

type AggregatedResults struct {
	Results []ClusterResult
	Summary ResultSummary
}

AggregatedResults contains results from all clusters

func NewAggregatedResults

func NewAggregatedResults(clusters []discovery.ClusterInfo) *AggregatedResults

NewAggregatedResults creates an initialized AggregatedResults

func (*AggregatedResults) AddResult

func (ar *AggregatedResults) AddResult(result ClusterResult)

AddResult adds a cluster result and updates the summary

type ClusterResult

type ClusterResult struct {
	ClusterName string
	Success     bool
	Items       []unstructured.Unstructured
	Output      string // Raw text output (for describe, logs, etc.)
	Error       error
}

ClusterResult represents the result from a single cluster

type Executor

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

Executor handles multi-cluster command execution

func NewExecutor

func NewExecutor(mappingManager *kubeconfig.Manager, configFlags *genericclioptions.ConfigFlags) *Executor

NewExecutor creates a new multi-cluster executor

func (*Executor) Describe

func (e *Executor) Describe(ctx context.Context, clusters []discovery.ClusterInfo, resource, name, namespace string) (*AggregatedResults, error)

Describe executes a describe command across multiple clusters

func (*Executor) Get

func (e *Executor) Get(ctx context.Context, clusters []discovery.ClusterInfo, resource, name, namespace string) (*AggregatedResults, error)

Get executes a get command across multiple clusters

type ExecutorConfig

type ExecutorConfig struct {
	MaxConcurrency  int  // Maximum number of concurrent cluster queries
	TimeoutSeconds  int  // Timeout for each cluster operation
	ContinueOnError bool // Continue if some clusters fail
}

ExecutorConfig configures the executor behavior

func DefaultConfig

func DefaultConfig() ExecutorConfig

DefaultConfig returns a sensible default configuration

type ResultSummary

type ResultSummary struct {
	Total      int
	Successful int
	Failed     int
	Errors     map[string]error // cluster name -> error
}

ResultSummary provides statistics about the multi-cluster operation

Jump to

Keyboard shortcuts

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