meter

package module
v0.0.0-...-958e258 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DrawFunc

type DrawFunc func(mi *Info) string

type Info

type Info struct {
	Labels []*LabelInfo
	Bar    *LabelInfo
}

type LabelInfo

type LabelInfo struct {
	Val string
	Fn  func(a interface{}, w ...interface{}) string
}

type Meter

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

func New

func New() *Meter

func (*Meter) Draw

func (m *Meter) Draw(rate float64, mi *Info) string

func (*Meter) SetDraw

func (m *Meter) SetDraw(draw DrawFunc) *Meter

func (*Meter) SetRateLimits

func (m *Meter) SetRateLimits(rateLow, rateHigh float64) *Meter

func (*Meter) SetWidth

func (m *Meter) SetWidth(width WidthFunc) *Meter

type WidthFunc

type WidthFunc func() int

Jump to

Keyboard shortcuts

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