Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMultipleClusters = errors.New("cube: multiple clusters") ErrEmptyCluster = errors.New("cube: empty cluster") ErrConfigAlreadyMerged = errors.New("cube: kubeconfig already merged") ErrClusterAlreadyExists = errors.New("cube: cluster already exists") ErrContextAlreadyExists = errors.New("cube: context already exists") ErrUserAlreadyExists = errors.New("cube: user already exists") ErrEmptyNameSuffix = errors.New("cube: empty name-suffix for merge") ErrInvalidLocalPort = errors.New("cube: invalid local port for merge") )
View Source
var ( ErrClusterNotFound = errors.New("cube: cluster not found for purging") ErrMultipleClustersFound = errors.New("cube: multiple clusters found for purging") )
Functions ¶
func LoadMainKC ¶
func LoadMainKC() (*clientcmdapi.Config, error)
LoadMainKC loads main kube config - ~/.kube/config
Types ¶
type Lister ¶
type Lister interface {
ListAllClusters() (model.ClusterInfos, error)
}
Lister lists all cluster info
type Merger ¶
type Merger interface { Merge() error Result() *clientcmdapi.Config LocalPort() int RemoteAPIAddr() string }
Merger merge another cluster config into local `~/.kube/config`
type PurgeOptions ¶
PurgeOptions represent options for purge.
type Purger ¶
type Purger interface { Purge() error Result() *clientcmdapi.Config Deleted() []string }
Purger deletes Kubernetes configs under given conditions
func NewPurger ¶
func NewPurger(opts PurgeOptions) Purger
Click to show internal directories.
Click to hide internal directories.