util

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterOutput

func FilterOutput(lines []string, search string, stripHeader bool) []string

func GetClientset

func GetClientset(kubeconfig string) *kubernetes.Clientset

func GetMatchingPods

func GetMatchingPods(service string, namespace string, context string, labels string) []string

func GetPodPrompt added in v0.3.0

func GetPodPrompt(podInfos []PodInfo, helpMessage string) promptui.Select

func GetPods

func GetPods(namespace string, context string, labels string) []string

func GetServicePods

func GetServicePods(service string, namespace string, context string, labels string) []string

func InteractiveCommand

func InteractiveCommand(name string, args ...string)

func K8sCommandArgs

func K8sCommandArgs(args []string, namespace string, context string, labels string) []string

func KeysString added in v0.2.1

func KeysString(m map[string]string) string

func RawK8sOutput

func RawK8sOutput(namespace string, context string, labels string, args ...string) []string

func RunCommand

func RunCommand(name string, args ...string) []string

func StreamCommand

func StreamCommand(c chan string, prefix string, name string, args ...string)

Types

type Age added in v0.1.2

type Age struct {
	Time time.Time
}

func (*Age) Relative added in v0.1.2

func (a *Age) Relative() string

type ColorManager

type ColorManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*ColorManager) Colorize

func (cm *ColorManager) Colorize(s string) string

func (*ColorManager) GetColor

func (cm *ColorManager) GetColor() color.Attribute

func (*ColorManager) GetPrefix

func (cm *ColorManager) GetPrefix(prefix string) string

type OutputManager

type OutputManager struct {
	sync.RWMutex

	HeaderColumns []string
	// contains filtered or unexported fields
}

func (*OutputManager) Append

func (o *OutputManager) Append(s ...string)

func (*OutputManager) FormattedStringSlice added in v0.2.1

func (o *OutputManager) FormattedStringSlice() []string

func (*OutputManager) GetOutput

func (o *OutputManager) GetOutput() []string

func (*OutputManager) HeaderLine added in v0.2.1

func (o *OutputManager) HeaderLine() string

func (*OutputManager) Print

func (o *OutputManager) Print()

type PodInfo added in v0.3.0

type PodInfo struct {
	Name     string
	Ready    string
	Status   string
	Restarts string
	Age      string
}

func CreatePodInfos added in v0.3.0

func CreatePodInfos(pods []string) []PodInfo

func (PodInfo) Print added in v0.3.0

func (p PodInfo) Print() string

Jump to

Keyboard shortcuts

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