archives

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	Interval uint32
	TTL      uint32
	Ready    uint32 // ready for reads for data as of this timestamp (or as of now-TTL, whichever is highest)
}

Archive is like conf.Retention except: * for archive 0, the "interval" is the raw interval of the metric, if it differs from what the retention specifies * only contains relevant fields for planning purposes

func NewArchive

func NewArchive(ret conf.Retention) Archive

func (Archive) Valid

func (a Archive) Valid(from, ttl uint32) bool

Valid returns whether the given Archive has been ready long enough (wrt from), and has a sufficient retention (wrt ttl)

type Archives

type Archives []Archive

func NewArchives

func NewArchives(rawInterval uint32, schemaID uint16) Archives

type Index

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

Index tracks all seen lists of archives

func NewIndex

func NewIndex() Index

func (*Index) ArchivesID

func (a *Index) ArchivesID(rawInterval uint32, schemaID uint16) int

ArchivesID returns the archivesId for the given request, and adds it to the index if it is new

func (Index) Get

func (a Index) Get(index int) Archives

Jump to

Keyboard shortcuts

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