Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRetentionDefs ¶
ParseRetentionDefs copy of original ParseRetentionDefs from go-whisper With support where old format:
secondsPerPoint:numberOfPoints
Types ¶
type CreateOpener ¶
type CreateOpener interface { Create(string, whisper.Retentions, whisper.AggregationMethod, float32) (*whisper.Whisper, error) Open(string) (*whisper.Whisper, error) }
CreateOpener whisper opener interface for mock in tests
type Persister ¶
type Persister struct { Clock clock.Clock Whisper CreateOpener }
Persister is a struct to hold dependencies via interface
type Whisper ¶
type Whisper struct {
// contains filtered or unexported fields
}
Whisper write data to *.wsp files
func NewWhisper ¶
func NewWhisper(rootPath string, schemas *WhisperSchemas, aggregation *WhisperAggregation, in chan *points.Points) *Whisper
NewWhisper create instance of Whisper
func (*Whisper) SetGraphPrefix ¶
SetGraphPrefix for internal cache metrics
func (*Whisper) SetMaxUpdatesPerSecond ¶ added in v0.4.3
SetMaxUpdatesPerSecond enable throttling
type WhisperAggregation ¶
type WhisperAggregation struct { Data []*whisperAggregationItem Default *whisperAggregationItem }
WhisperAggregation ...
func NewWhisperAggregation ¶
func NewWhisperAggregation() *WhisperAggregation
NewWhisperAggregation create instance of WhisperAggregation
func ReadWhisperAggregation ¶
func ReadWhisperAggregation(file string) (*WhisperAggregation, error)
ReadWhisperAggregation ...
type WhisperFactory ¶
type WhisperFactory struct{}
WhisperFactory - holder for factory functions
func (WhisperFactory) Create ¶
func (WhisperFactory) Create(path string, retentions whisper.Retentions, aggregationMethod whisper.AggregationMethod, xFilesFactor float32) (*whisper.Whisper, error)
Create creates a new underlying whisperdb file
func (WhisperFactory) Open ¶
func (WhisperFactory) Open(path string) (*whisper.Whisper, error)
Open opens an existing underlying whisperdb file
type WhisperSchemas ¶
type WhisperSchemas struct {
Data []*whisperSchemaItem
}
WhisperSchemas ...
func NewWhisperSchemas ¶
func NewWhisperSchemas() *WhisperSchemas
NewWhisperSchemas create instance of WhisperSchemas
func ReadWhisperSchemas ¶
func ReadWhisperSchemas(file string) (*WhisperSchemas, error)
ReadWhisperSchemas ...