k8sconfig

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Provide connection details to a Kubernetes cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Config                *rest.Config
	DefaultRequestTimeout time.Duration
	UseOldResourceVersion bool
}

func (*Cluster) ChooseResourceVersion

func (cluster *Cluster) ChooseResourceVersion(oldRv string, newRv *string) (string, error)

type Config

type Config interface {
	// TargetName returns the name of thetarget cluster.
	// ProvideTarget() is equivalent to Provide(TargetName()).
	TargetName() string

	// Provide returns the rest config for a named cluster.
	// Returns nil if the cluster is not available.
	// Mainly used when the main cluster contains references to other clusters.
	Provide(clusterName string) *Cluster
}

type MockConfig

type MockConfig struct {
	TargetClusterName string
	Clusters          map[string]*Cluster
}

func (*MockConfig) Provide

func (c *MockConfig) Provide(clusterName string) *Cluster

func (*MockConfig) TargetName

func (c *MockConfig) TargetName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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