dashboardbuilder

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(tableType enums.TableType, host *domainhost.Host, cliGateway *cligw.Gateway) (*Builder, error)

NewBuilder creates a new Builder instance with the provided CLI gateway. It initializes the termbox terminal and dashboard, and sets up a context and quitter function. If an error occurs during initialization, it returns an error.

func (*Builder) Init

func (db *Builder) Init() (err error)

Init initializes the dashboard by fetching the cells, columns, and rows configurations from the `dashboards` package and using them to build a new `grid` with the `grid.New()` method. It then uses the built grid to create a new dashboard using the `container.New()` method. The dashboard instance is stored in the `db.dashboard` field for later use.

func (*Builder) Render

func (db *Builder) Render() (err error)

Render renders the dashboard by starting the query and rerender loops, and waiting for them to complete. It returns an error if any of the loops encounter an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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