whisper

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: BSD-2-Clause-Views, BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

package whisper is a copy of some stuff we need from https://github.com/go-graphite/go-whisper in particular, it removes flock stuff which doesn't build on windows

Index

Constants

View Source
const (
	PointSize = 12

	Seconds = 1
	Minutes = 60
	Hours   = 3600
	Days    = 86400
	Weeks   = 86400 * 7
	Years   = 86400 * 365
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Retention

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

A retention level.

Retention levels describe a given archive in the database. How detailed it is and how far back it records.

func NewRetention

func NewRetention(secondsPerPoint, numberOfPoints int) Retention

func ParseRetentionDef

func ParseRetentionDef(retentionDef string) (*Retention, error)

Parse a retention definition as you would find in the storage-schemas.conf of a Carbon install. Note that this only parses a single retention definition, if you have multiple definitions (separated by a comma) you will have to split them yourself.

ParseRetentionDef("10s:14d") Retention{10, 120960}

See: http://graphite.readthedocs.org/en/1.0/config-carbon.html#storage-schemas-conf

func (*Retention) MaxRetention

func (retention *Retention) MaxRetention() int

func (*Retention) NumberOfPoints

func (retention *Retention) NumberOfPoints() int

func (*Retention) SecondsPerPoint

func (retention *Retention) SecondsPerPoint() int

func (*Retention) Size

func (retention *Retention) Size() int

type Retentions

type Retentions []*Retention

func ParseRetentionDefs

func ParseRetentionDefs(retentionDefs string) (Retentions, error)

func (Retentions) Len

func (r Retentions) Len() int

func (Retentions) Swap

func (r Retentions) Swap(i, j int)

Jump to

Keyboard shortcuts

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