cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAndExecute

func InitAndExecute()

Types

type Config

type Config struct {
	LogLevel       string
	KubeFlags      *genericclioptions.ConfigFlags
	ShowContainers bool
	Format         string
	ShowStatus     bool
}

type Container

type Container struct {
	Name   string
	Status string
}

type Node

type Node struct {
	Name   string
	Pods   []*Pod
	Status string
}

func (*Node) AddPod

func (n *Node) AddPod(pod *Pod)

type Output

type Output struct {
	Nodes []*Node
}

func FetchKubeData

func FetchKubeData(client *plugin.Client, namespace string) (*Output, error)

func NewOutput

func NewOutput(nodeMap map[string]*Node) *Output

func (*Output) Json

func (o *Output) Json() string

func (*Output) List

func (o *Output) List(showStatus bool) string

func (*Output) RemoveContainers

func (o *Output) RemoveContainers()

func (*Output) Table

func (o *Output) Table(showContainers bool, showStatus bool) *tablewriter.Table

type Pod

type Pod struct {
	Name       string
	Namespace  string
	Containers []*Container
	Status     string
}

Jump to

Keyboard shortcuts

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