model

package
v0.0.0-...-77b1a84 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo

type ClusterInfo struct {
	Name       string `json:"name"`
	SSHForward string `json:"sshForward"`
}

func (ClusterInfo) String

func (f ClusterInfo) String() string

type ClusterInfos

type ClusterInfos []ClusterInfo

func (ClusterInfos) Len

func (c ClusterInfos) Len() int

func (ClusterInfos) Less

func (c ClusterInfos) Less(i, j int) bool

func (ClusterInfos) String

func (c ClusterInfos) String() string

func (ClusterInfos) Swap

func (c ClusterInfos) Swap(i, j int)

type ClusterKeyInfo

type ClusterKeyInfo struct {
	Kc *clientcmdapi.Config // config where the cluster info belongs to

	ClusterName string
	Cluster     *clientcmdapi.Cluster
	IsHTTP      bool // whether the schema of cluster's server address is `HTTP`

	CtxName string
	Ctx     *clientcmdapi.Context

	User *clientcmdapi.AuthInfo
}

ClusterKeyInfo contains key info about a k8s cluster from given kubectl config.

func NewClusterKeyInfo

func NewClusterKeyInfo(kc *clientcmdapi.Config, clusterName string) ClusterKeyInfo

NewClusterKeyInfo extracts key infos for given cluster, only care about sections - `clusters/contexts/users'. Call should guarantee the cluster name exist in the kubectl config

type ClusterKeyInfos

type ClusterKeyInfos []ClusterKeyInfo

func NewClusterKeyInfos

func NewClusterKeyInfos(kc *clientcmdapi.Config) ClusterKeyInfos

Jump to

Keyboard shortcuts

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