kubeconfig

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SshProtocol  = "ssh://"
	FileProtocol = "file://"
	LocalHost    = "127.0.0.1"
)

Functions

func TruncateDestination

func TruncateDestination(path string) error

Types

type KubeConfig

type KubeConfig struct {
	Url    *url.URL
	Bytes  []byte
	Config clientcmdapi.Config
	Label  string
	SrcDef cfg.Source
}

func DestInit added in v0.0.3

func DestInit(source string) (konf *KubeConfig, err error)

func SourceInit added in v0.0.3

func SourceInit(source cfg.Source, label string) (konf *KubeConfig, err error)

func (*KubeConfig) CopyCurrentContext

func (k *KubeConfig) CopyCurrentContext(from *KubeConfig) error

func (*KubeConfig) Delete added in v0.0.3

func (k *KubeConfig) Delete(label string) error

func (*KubeConfig) List added in v0.0.3

func (k *KubeConfig) List(label string, source cfg.Source) error

func (*KubeConfig) MergeOne

func (k *KubeConfig) MergeOne(sourceKonfig *KubeConfig) error

func (*KubeConfig) ReadConfig

func (k *KubeConfig) ReadConfig() (err error)

func (*KubeConfig) ToYaml

func (k *KubeConfig) ToYaml() ([]byte, error)

func (*KubeConfig) WriteConfig

func (k *KubeConfig) WriteConfig() (err error)

Jump to

Keyboard shortcuts

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