kubectl

package
v0.0.0-...-39d6a1f Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetPodRoute = "kubectl/get/pods"
)

Variables

View Source
var (
	Log   = util.Log
	DEBUG = util.DEBUG
	INFO  = util.INFO
	WARN  = util.WARN
	ERROR = util.ERROR
)
View Source
var TotalGetPodRoute = rootPath + GetPodRoute

Functions

func GetClientSet

func GetClientSet(config *rest.Config) *kubernetes.Clientset

func GetContext

func GetContext() *rest.Config

func GetPodsHandler

func GetPodsHandler(w http.ResponseWriter, r *http.Request)

func HandleNewContext

func HandleNewContext(_ http.ResponseWriter, _ *http.Request)

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

func PodListToTable

func PodListToTable(list v1.PodList) ([]string, [][]string, error)

func PodToStrArr

func PodToStrArr(pod v1.Pod) []string

Types

type Kubectl

type Kubectl struct {
	Client kubernetes.Clientset
}
var Kctl *Kubectl

func NewKubectl

func NewKubectl() *Kubectl

func (*Kubectl) GetPods

func (kubectl *Kubectl) GetPods(namespace string) (*v1.PodList, error)

Jump to

Keyboard shortcuts

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