compact

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUCol

type CPUCol struct {
	*GaugeCol
	// contains filtered or unexported fields
}

func (*CPUCol) SetMetrics

func (w *CPUCol) SetMetrics(m models.Metrics)

type CompactCol

type CompactCol interface {
	ui.GridBufferer
	Reset()
	Header() string  // header text to display for column
	FixedWidth() int // fixed width size. if == 0, width is automatically calculated
	Highlight()
	UnHighlight()
	SetMeta(models.Meta)
	SetMetrics(models.Metrics)
}

func NewCIDCol

func NewCIDCol() CompactCol

func NewCPUCol

func NewCPUCol() CompactCol

func NewCpuScaledCol

func NewCpuScaledCol() CompactCol

func NewCreatedCol

func NewCreatedCol() CompactCol

func NewIOCol

func NewIOCol() CompactCol

func NewImageCol

func NewImageCol() CompactCol

func NewIpsCol

func NewIpsCol() CompactCol

func NewMemCol

func NewMemCol() CompactCol

func NewNameCol

func NewNameCol() CompactCol

func NewNetCol

func NewNetCol() CompactCol

func NewPIDCol

func NewPIDCol() CompactCol

func NewPortsCol

func NewPortsCol() CompactCol

func NewStatus

func NewStatus() CompactCol

func NewUptimeCol

func NewUptimeCol() CompactCol

type CompactGrid

type CompactGrid struct {
	ui.GridBufferer

	Rows   []RowBufferer
	X, Y   int
	Width  int
	Height int
	Offset int // starting row offset
	// contains filtered or unexported fields
}

func NewCompactGrid

func NewCompactGrid() *CompactGrid

func (*CompactGrid) AddRows

func (cg *CompactGrid) AddRows(rows ...RowBufferer)

func (*CompactGrid) Align

func (cg *CompactGrid) Align()

func (*CompactGrid) Buffer

func (cg *CompactGrid) Buffer() ui.Buffer

func (*CompactGrid) Clear

func (cg *CompactGrid) Clear()

func (*CompactGrid) GetHeight

func (cg *CompactGrid) GetHeight() int

func (*CompactGrid) MaxRows

func (cg *CompactGrid) MaxRows() int

func (*CompactGrid) SetWidth

func (cg *CompactGrid) SetWidth(w int)

func (*CompactGrid) SetX

func (cg *CompactGrid) SetX(x int)

func (*CompactGrid) SetY

func (cg *CompactGrid) SetY(y int)

type CompactHeader

type CompactHeader struct {
	X, Y   int
	Width  int
	Height int
	// contains filtered or unexported fields
}

func NewCompactHeader

func NewCompactHeader() *CompactHeader

func (*CompactHeader) Buffer

func (row *CompactHeader) Buffer() ui.Buffer

func (*CompactHeader) GetHeight

func (row *CompactHeader) GetHeight() int

func (*CompactHeader) SetWidths

func (row *CompactHeader) SetWidths(totalWidth int, widths []int)

func (*CompactHeader) SetX

func (row *CompactHeader) SetX(x int)

func (*CompactHeader) SetY

func (row *CompactHeader) SetY(y int)

type CompactRow

type CompactRow struct {
	Bg     *RowBg
	Cols   []CompactCol
	X, Y   int
	Height int
	// contains filtered or unexported fields
}

func NewCompactRow

func NewCompactRow() *CompactRow

func (*CompactRow) Buffer

func (row *CompactRow) Buffer() ui.Buffer

func (*CompactRow) GetHeight

func (row *CompactRow) GetHeight() int

func (*CompactRow) Highlight

func (row *CompactRow) Highlight()

func (*CompactRow) Reset

func (row *CompactRow) Reset()

Set gauges, counters, etc. to default unread values

func (*CompactRow) SetMeta

func (row *CompactRow) SetMeta(m models.Meta)

func (*CompactRow) SetMetrics

func (row *CompactRow) SetMetrics(m models.Metrics)

func (*CompactRow) SetWidths

func (row *CompactRow) SetWidths(totalWidth int, widths []int)

func (*CompactRow) SetY

func (row *CompactRow) SetY(y int)

func (*CompactRow) UnHighlight

func (row *CompactRow) UnHighlight()

type GaugeCol

type GaugeCol struct {
	*ui.Gauge
	// contains filtered or unexported fields
}

func NewGaugeCol

func NewGaugeCol(header string) *GaugeCol

func (*GaugeCol) Buffer

func (w *GaugeCol) Buffer() ui.Buffer

func (*GaugeCol) FixedWidth

func (w *GaugeCol) FixedWidth() int

func (*GaugeCol) Header

func (w *GaugeCol) Header() string

func (*GaugeCol) Highlight

func (w *GaugeCol) Highlight()

GaugeCol implements CompactCol

func (*GaugeCol) Reset

func (w *GaugeCol) Reset()

func (*GaugeCol) SetMeta

func (w *GaugeCol) SetMeta(models.Meta)

GaugeCol implements CompactCol

func (*GaugeCol) SetMetrics

func (w *GaugeCol) SetMetrics(models.Metrics)

func (*GaugeCol) UnHighlight

func (w *GaugeCol) UnHighlight()

GaugeCol implements CompactCol

type IOCol

type IOCol struct {
	*TextCol
}

func (*IOCol) SetMetrics

func (w *IOCol) SetMetrics(m models.Metrics)

type MemCol

type MemCol struct {
	*GaugeCol
}

func (*MemCol) SetMetrics

func (w *MemCol) SetMetrics(m models.Metrics)

type MetaCol

type MetaCol struct {
	*TextCol
	// contains filtered or unexported fields
}

Column that shows container's meta property i.e. name, id, image tc.

func (*MetaCol) SetMeta

func (w *MetaCol) SetMeta(m models.Meta)

type NetCol

type NetCol struct {
	*TextCol
}

func (*NetCol) SetMetrics

func (w *NetCol) SetMetrics(m models.Metrics)

type NewCompactColFn

type NewCompactColFn func() CompactCol

type PIDCol

type PIDCol struct {
	*TextCol
}

func (*PIDCol) SetMetrics

func (w *PIDCol) SetMetrics(m models.Metrics)

type RowBg

type RowBg struct {
	*ui.Par
}

func NewRowBg

func NewRowBg() *RowBg

func (*RowBg) Highlight

func (w *RowBg) Highlight()

func (*RowBg) UnHighlight

func (w *RowBg) UnHighlight()

type RowBufferer

type RowBufferer interface {
	SetY(int)
	SetWidths(int, []int)
	GetHeight() int
	Buffer() ui.Buffer
}

type Status

type Status struct {
	*ui.Block
	// contains filtered or unexported fields
}

Status indicator

func (*Status) Buffer

func (s *Status) Buffer() ui.Buffer

func (*Status) FixedWidth

func (s *Status) FixedWidth() int

func (*Status) Header

func (s *Status) Header() string

func (*Status) Highlight

func (s *Status) Highlight()

func (*Status) Reset

func (s *Status) Reset()

Status implements CompactCol

func (*Status) SetMeta

func (s *Status) SetMeta(m models.Meta)

func (*Status) SetMetrics

func (s *Status) SetMetrics(models.Metrics)

func (*Status) UnHighlight

func (s *Status) UnHighlight()

type TextCol

type TextCol struct {
	*ui.Par
	// contains filtered or unexported fields
}

func NewTextCol

func NewTextCol(header string) *TextCol

func (*TextCol) FixedWidth

func (w *TextCol) FixedWidth() int

func (*TextCol) GrowPriority added in v0.1.16

func (w *TextCol) GrowPriority() int

func (*TextCol) Header

func (w *TextCol) Header() string

func (*TextCol) Highlight

func (w *TextCol) Highlight()

func (*TextCol) MaxWidth added in v0.1.16

func (w *TextCol) MaxWidth() int

func (*TextCol) MinWidth added in v0.1.16

func (w *TextCol) MinWidth() int

func (*TextCol) Reset

func (w *TextCol) Reset()

TextCol implements CompactCol

func (*TextCol) SetMeta

func (w *TextCol) SetMeta(models.Meta)

func (*TextCol) SetMetrics

func (w *TextCol) SetMetrics(models.Metrics)

func (*TextCol) UnHighlight

func (w *TextCol) UnHighlight()

type UptimeCol

type UptimeCol struct {
	*TextCol
}

func (*UptimeCol) SetMeta

func (w *UptimeCol) SetMeta(m models.Meta)

Jump to

Keyboard shortcuts

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