dashboard

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package dashboard implements simple UI for Talos cluster monitoring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(ctx context.Context, c *client.Client, interval time.Duration) error

Main is the entrypoint into talosctl dashboard command.

Types

type APISource

type APISource struct {
	*client.Client

	Interval time.Duration
	// contains filtered or unexported fields
}

APISource provides monitoring data via Talos API.

func (*APISource) Run

func (source *APISource) Run(ctx context.Context) <-chan *data.Data

Run the data poll on interval.

func (*APISource) Stop

func (source *APISource) Stop()

Stop the data collection process.

type DataWidget

type DataWidget interface {
	Update(node string, data *data.Data)
}

DataWidget is a widget which consumes Data to draw itself.

type UI

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

UI represents the grid, widgets and main loop.

func (*UI) Main

func (u *UI) Main(ctx context.Context, dataCh <-chan *data.Data) error

Main is the UI entrypoint.

func (*UI) Resize

func (u *UI) Resize(width, height int)

Resize handles the resize events.

func (*UI) UpdateData

func (u *UI) UpdateData()

UpdateData re-renders the widgets with new data.

Directories

Path Synopsis
Package components implements specific widgets for the dashboard.
Package components implements specific widgets for the dashboard.
Package data implements types to handle monitoring data, calculate values from it, etc.
Package data implements types to handle monitoring data, calculate values from it, etc.

Jump to

Keyboard shortcuts

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