metrictank: github.com/grafana/metrictank/archives Index | Files

package archives

import "github.com/grafana/metrictank/archives"

Index

Package Files

archives.go index.go

type Archive Uses

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 Uses

func NewArchive(ret conf.Retention) Archive

func (Archive) Valid Uses

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 Uses

type Archives []Archive

func NewArchives Uses

func NewArchives(rawInterval uint32, schemaID uint16) Archives

type Index Uses

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

Index tracks all seen lists of archives

func NewIndex Uses

func NewIndex() Index

func (*Index) ArchivesID Uses

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 Uses

func (a Index) Get(index int) Archives

Package archives imports 2 packages (graph) and is imported by 3 packages. Updated 2020-04-30. Refresh now. Tools for package owners.