collection

package
v0.0.0-...-81a4f0c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.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 TSD

type TSD interface {
	GetTimestamp() int64
	HasLabels(map[string]string) bool
}

type TSDCache

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

func NewTSDCache

func NewTSDCache(capacity int) *TSDCache

func (*TSDCache) Put

func (c *TSDCache) Put(d TSD)

func (*TSDCache) Query

func (c *TSDCache) Query(start, end int64, labels map[string]string) ([]TSD, bool)

Query returns the time series with the timestamp in [start, end) If it can not guarantee all the data are in cache, it returns ([start, end), false)

func (*TSDCache) String

func (c *TSDCache) String() string

Jump to

Keyboard shortcuts

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