rrd

package
v0.0.0-...-6eec0fd Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

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

Bucket type struct

func NewBucket

func NewBucket(resolution, size int, rollingTotal bool) *Bucket

NewBucket - new RDD bucket

func (*Bucket) Add

func (b *Bucket) Add(timestamp int64, val float64)

Add - add item to bucket

func (*Bucket) LastValue

func (b *Bucket) LastValue() *common.SinglePointValue

LastValue - get bucket last value

func (*Bucket) SetResolution

func (b *Bucket) SetResolution(resolution int)

SetResolution - set bucket resolution

func (*Bucket) Skip

func (b *Bucket) Skip(tm int64)

Skip - do nothing

func (*Bucket) ValuesSince

func (b *Bucket) ValuesSince(tm time.Time) []*common.SinglePointValue

ValuesSince - get bucket values simce time

type SimpleBucket

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

SimpleBucket type struct

func NewSimpleBucket

func NewSimpleBucket(resolution, size int) *SimpleBucket

NewSimpleBucket - create simple bucket

func (*SimpleBucket) Add

func (b *SimpleBucket) Add(timestamp int64, val interface{})

Add - add to bucket

func (*SimpleBucket) LastValue

func (b *SimpleBucket) LastValue() interface{}

LastValue - get last value

func (*SimpleBucket) Size

func (b *SimpleBucket) Size() int

Size - get bucket size

func (*SimpleBucket) ValuesSince

func (b *SimpleBucket) ValuesSince(tm time.Time) []interface{}

ValuesSince - get values since time

Jump to

Keyboard shortcuts

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