Documentation
¶
Index ¶
- Constants
- Variables
- func GetOccupiedLocalPort(srv string) (host string, port int, err error)
- func LocalCachePath(remoteAddr string) string
- func NewLister() kube.Lister
- func NewMerger(opts MergeOptions) kube.Merger
- func ParseContext(kc *clientcmdapi.Config, ctxName string) (*model.ClusterInfo, error)
- type DownloadResult
- type Downloader
- type MergeOptions
Constants ¶
View Source
const ( SepAt = "@" SepHyphen = "-" SepColon = ":" DefaultRemotePort = 6443 )
View Source
const (
// DefaultHost is the host used to represent remote master locally
DefaultHost = "kubernetes"
)
View Source
const (
// DefaultKubeConfigPath is default kubeconfig path on remote host.
DefaultKubeConfigPath = "~/.kube/config"
)
Variables ¶
Functions ¶
func GetOccupiedLocalPort ¶
func LocalCachePath ¶
LocalCachePath returns cache path for remote kubectl config by convention. that's, `~/.config/cube/cache/$HOST`.
func NewMerger ¶
func NewMerger(opts MergeOptions) kube.Merger
func ParseContext ¶
func ParseContext(kc *clientcmdapi.Config, ctxName string) (*model.ClusterInfo, error)
Types ¶
type DownloadResult ¶
type DownloadResult struct { ClusterName string // matched cluster name Kc *clientcmdapi.Config // remote kubectl config }
DownloadResult represents the download status
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader download kubernetes config for remote cluster. also download cert files if necessary.
func NewDownloader ¶
func NewDownloader(remoteAddr string) *Downloader
NewDownloader create a new remote config downloader.
func (*Downloader) Download ¶
func (d *Downloader) Download() (DownloadResult, error)
Download fetches config and cert files.
Click to show internal directories.
Click to hide internal directories.