app

package
v0.0.0-...-a6d1b12 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

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 NewConfig

func NewConfig() *Config

NewConfig returns a new k8s client config

func (*Config) ConfigAccess

func (c *Config) ConfigAccess() clientcmd.ConfigAccess

func (*Config) RESTClient

func (c *Config) RESTClient() (*rest.Config, error)

func (*Config) RawConfig

func (c *Config) RawConfig() (api.Config, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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