Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientProvider ¶
type ClientProvider struct {
// contains filtered or unexported fields
}
ClientProvider holds kube client and its config
func NewClient ¶
func NewClient(config *Config) (*ClientProvider, error)
NewClient creates a k8s client
func (*ClientProvider) CurrentContext ¶
func (c *ClientProvider) CurrentContext() (string, error)
CurrentContext returns current k8s context
func (*ClientProvider) CurrentNamespace ¶
func (c *ClientProvider) CurrentNamespace() (string, error)
CurrentNamespace returns current k8s namespace
func (*ClientProvider) Namespaces ¶
func (c *ClientProvider) Namespaces() ([]v1.Namespace, error)
Namespaces gets k8s namespaces
func (*ClientProvider) Ping ¶
func (c *ClientProvider) Ping() (bool, error)
Ping checks connection to k8s server
func (*ClientProvider) SwitchNamespace ¶
func (c *ClientProvider) SwitchNamespace(ns string) error
SwitchNamespace switch to provided namespace
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) ConfigAccess ¶
func (c *Config) ConfigAccess() clientcmd.ConfigAccess
Click to show internal directories.
Click to hide internal directories.