chunks

package
v0.0.0-...-7d175ed Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CS

type CS struct {
	Chunks []*Chunk

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewChunks

func NewChunks(c config.CacheConfig) *CS

func (*CS) Get

func (cs *CS) Get(from, to int64) []Iter

func (*CS) GetInfo

func (cs *CS) GetInfo() (uint32, uint32)

GetInfo get oldest ts and newest ts in cache

func (*CS) GetInfoUnsafe

func (cs *CS) GetInfoUnsafe() (uint32, uint32)

func (*CS) Push

func (cs *CS) Push(ts int64, value float64) error

type Chunk

type Chunk struct {
	tsz.Series
	FirstTs   uint32
	LastTs    uint32
	NumPoints uint32
	Closed    bool
}

func NewChunk

func NewChunk(t0 uint32) *Chunk

func (*Chunk) Finish

func (c *Chunk) Finish()

func (*Chunk) Push

func (c *Chunk) Push(t uint32, v float64) error

type Iter

type Iter struct {
	*tsz.Iter
}

func NewIter

func NewIter(i *tsz.Iter) Iter

Jump to

Keyboard shortcuts

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