view

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxContainers = 1000
View Source
const MaxHorizPosition = int(TimeInfo)

Variables

View Source
var InfoHeaders map[DockerInfoType]string = map[DockerInfoType]string{
	ImageInfo:      "Image",
	Names:          "Names",
	PortInfo:       "Ports",
	BindInfo:       "Mounts",
	CommandInfo:    "Command",
	EntrypointInfo: "Entrypoint",
	EnvInfo:        "Envs",
	VolumesInfo:    "Volumes",
	TimeInfo:       "Created At",
}

Functions

This section is empty.

Types

type ContainerSlice

type ContainerSlice []*goDocker.Container

func (ContainerSlice) Len

func (p ContainerSlice) Len() int

func (ContainerSlice) Less

func (p ContainerSlice) Less(i, j int) bool

func (ContainerSlice) Swap

func (p ContainerSlice) Swap(i, j int)

type DockerInfoType

type DockerInfoType int
const (
	ImageInfo DockerInfoType = iota
	Names
	PortInfo
	BindInfo
	CommandInfo
	EntrypointInfo
	EnvInfo
	VolumesInfo
	TimeInfo
)

type UIEvent

type UIEvent int
const (
	KeyArrowUp UIEvent = 1 << iota
	KeyArrowDown
	KeyArrowLeft
	KeyArrowRight
	KeyCtrlC
	KeyCtrlD
	KeyQ
	Resize
	KeyI
)

type View

type View struct {
	Grid     *ui.Grid
	Header   *widgets.Paragraph
	InfoBar  *widgets.Paragraph
	CpuChart *widgets.BarChart
	MemChart *widgets.BarChart
	NameList *widgets.List
	InfoList *widgets.List
}

func NewView

func NewView() *View

func (*View) Render

func (v *View) Render()

func (*View) RenderContainers

func (v *View) RenderContainers(containers map[string]*goDocker.Container, infoType DockerInfoType, listOffset int, inspectMode bool)

func (*View) ResetSize

func (v *View) ResetSize()

func (*View) SetLayout

func (v *View) SetLayout()

func (*View) UpdateStats

func (v *View) UpdateStats(statsCharts *docklistener.StatsMsg, offset int)

Jump to

Keyboard shortcuts

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