ui

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QClrLine = "\033[K"
	QReset   = "\033[2J"
)

...

View Source
const (
	Clear     = 0
	LightBlue = 94
)

...

View Source
const (
	Black = 30 + iota
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	LightGray
)

...

Variables

This section is empty.

Functions

This section is empty.

Types

type DataLine

type DataLine struct {
	Label   string
	Line    int
	Default string
	LastVal string
	// contains filtered or unexported fields
}

DataLine ...

func (*DataLine) Print

func (dl *DataLine) Print()

Print ...

func (*DataLine) SetVal

func (dl *DataLine) SetVal(s string)

SetVal ...

type GooeyApp

type GooeyApp struct {
	Title      string
	DataFields []*DataLine
	Log        *Log
	// contains filtered or unexported fields
}

GooeyApp ..

func (*GooeyApp) NewDataLine

func (a *GooeyApp) NewDataLine(line int, label, defval string) *DataLine

NewDataLine ...

func (*GooeyApp) Print

func (a *GooeyApp) Print()

Print ...

type Log

type Log struct {
	Size      int
	StartLine int
	Messages  []string
	// contains filtered or unexported fields
}

Log ...

func NewLog

func NewLog(writer io.Writer, line, size int) *Log

NewLog ...

func (*Log) Add

func (l *Log) Add(m string)

Add ...

func (*Log) Print

func (l *Log) Print()

Print ...

type LogNotifee

type LogNotifee struct {
	// contains filtered or unexported fields
}

LogNotifee ...

func (*LogNotifee) ClosedStream

func (ln *LogNotifee) ClosedStream(net.Network, net.Stream)

ClosedStream ...

func (*LogNotifee) Connected

func (ln *LogNotifee) Connected(_ net.Network, c net.Conn)

Connected ...

func (*LogNotifee) Disconnected

func (ln *LogNotifee) Disconnected(_ net.Network, c net.Conn)

Disconnected ...

func (*LogNotifee) Listen

func (ln *LogNotifee) Listen(net.Network, ma.Multiaddr)

Listen ...

func (*LogNotifee) ListenClose

func (ln *LogNotifee) ListenClose(net.Network, ma.Multiaddr)

ListenClose ...

func (*LogNotifee) OpenedStream

func (ln *LogNotifee) OpenedStream(net.Network, net.Stream)

OpenedStream ...

type Theme

type Theme int

Theme is the style of UI to render

const (
	// Logey is a UI theme that simply logs data periodically to stdout
	Logey Theme = iota
	// Gooey is a UI theme that refreshes values in place
	Gooey
)

type UI

type UI struct {
	// contains filtered or unexported fields
}

UI is a simple command line interface to the Prometheus /metrics endpoint

func NewUI

func NewUI(theme Theme, opts ...uiopts.Option) (*UI, error)

NewUI constructs a new "UI" for the Prometheus /metrics endpoint

func (*UI) Render

func (ui *UI) Render(ctx context.Context) error

Render displays and updates a "UI" for the Prometheus /metrics endpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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