uptime

package
v2.20.5 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PercentSuffix = "%"

Variables

This section is empty.

Functions

func CategoriesString

func CategoriesString() []string

func Float64ToUptimeString

func Float64ToUptimeString(digits uint, f float32) string

func UptimeCounts

func UptimeCounts(categories, observations []float64) (map[float64]uint, error)

Types

type Data

type Data []Datum

func (Data) Decimals

func (d Data) Decimals() Decimals

func (Data) Descriptions

func (d Data) Descriptions(fnIncl func(s string) bool, fnFmt func(s string) string, sortAsc bool) []string

func (Data) Filter

func (d Data) Filter(fnIncl func(md Datum) bool) Data

func (Data) HistogramDecimal

func (d Data) HistogramDecimal(categories []decimal.Decimal, suffix string) (*histogram.Histogram, error)

func (Data) Table

func (d Data) Table(name string) *table.Table

func (Data) WriteXLSX

func (d Data) WriteXLSX(filename, sheetname string, perm os.FileMode) error

type Datum

type Datum struct {
	Title         string
	Description   string
	UptimeDecimal *decimal.Decimal
}

type Decimals

type Decimals []decimal.Decimal

func CategoriesDecimal

func CategoriesDecimal() Decimals

func (Decimals) Floats

func (d Decimals) Floats() []float64

func (Decimals) Histogram

func (d Decimals) Histogram(categories Decimals, suffix string) (*histogram.Histogram, error)

func (Decimals) Strings

func (d Decimals) Strings(suffix string) []string

Jump to

Keyboard shortcuts

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