Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterInfo ¶
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
Click to show internal directories.
Click to hide internal directories.