history

package
v0.0.0-...-c9a03b5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBinsConfig = BinsConfig{
	PeriodLength: 1 * time.Hour,
	PeriodCount:  24,
	MaxBinCount:  1024,
}
View Source
var DefaultErrorsConfig = ErrorsConfig{
	PeriodLength: 5 * time.Minute,
	PeriodCount:  288,
}

Functions

This section is empty.

Types

type Bins

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

func NewBins

func NewBins(config BinsConfig) (*Bins, error)

func (*Bins) Data

func (h *Bins) Data() (out models.BinsHistory)

func (*Bins) Load

func (h *Bins) Load(r io.Reader) error

Load loads a serialized state. The config parameters need to match the current instance.

func (*Bins) Save

func (h *Bins) Save(w io.Writer) error

Save serializes the current state in an opaque binary format.

func (*Bins) Update

func (h *Bins) Update(status models.Status, bins models.Bins, now time.Time)

type BinsConfig

type BinsConfig struct {
	PeriodLength time.Duration
	PeriodCount  int
	MaxBinCount  int
}

type Errors

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

func NewErrors

func NewErrors(config ErrorsConfig) (*Errors, error)

func (*Errors) Data

func (h *Errors) Data() (out models.ErrorsHistory)

func (*Errors) Load

func (h *Errors) Load(r io.Reader) error

Load loads a serialized state. The config parameters need to match the current instance.

func (*Errors) Save

func (h *Errors) Save(w io.Writer) error

Save serializes the current state in an opaque binary format.

func (*Errors) Update

func (h *Errors) Update(status models.Status, now time.Time)

type ErrorsConfig

type ErrorsConfig struct {
	PeriodLength time.Duration
	PeriodCount  int
}

Jump to

Keyboard shortcuts

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