util

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: MIT Imports: 12 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 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()

Jump to

Keyboard shortcuts

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