viewer

package
v0.0.0-...-8261bc7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Values []float64 `json:"values"`
	Time   string    `json:"time"`
}

type Updater

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

TODO merge together with Viewer

func (*Updater) Start

func (u *Updater) Start()

func (*Updater) Stop

func (u *Updater) Stop()

func (*Updater) ViewerRefresh

func (u *Updater) ViewerRefresh()

TODO move to Viewer TODO at every refresh, we can fetch new data completely avoiding the polling() routine ViewerRefresh is used by Viewer to update last time it was refreshed

type Viewer

type Viewer struct {
	Name        string
	Address     string
	AddressPath string
	Graph       *charts.Line
	// contains filtered or unexported fields
}

func NewViewer

func NewViewer(name, address, addressPath string,
	ctx context.Context, interval, shutdownTimeout int) *Viewer

func (*Viewer) Handler

func (v *Viewer) Handler(w http.ResponseWriter, _ *http.Request)

func (*Viewer) Start

func (v *Viewer) Start()

func (*Viewer) Stop

func (v *Viewer) Stop()

type ViewerTemplate

type ViewerTemplate struct {
	Interval  int
	MaxPoints int
	Address   string
	ViewPath  string
	ViewID    string
}

ViewerTemplate defines fields used in the default view template WARN: changing names or types, please remember to change also the content of statics.ViewTemplate const

Jump to

Keyboard shortcuts

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