Version: v0.12.0 Latest Latest

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

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



package persister is a copy of with non essential stuff removed, and using a fork of go-whisper, which allows us to build on windows

this is a parser for graphite's storage-schemas.conf it supports old and new retention format see based on but with some improvements



This section is empty.


This section is empty.


func ParseRetentionDefs

func ParseRetentionDefs(retentionDefs string) (whisper.Retentions, error)

ParseRetentionDefs parses retention definitions into a Retentions structure


type Schema

type Schema struct {
	Name         string
	Pattern      *regexp.Regexp
	RetentionStr string
	Retentions   whisper.Retentions
	Priority     int64

Schema represents one schema setting

type WhisperSchemas

type WhisperSchemas []Schema

WhisperSchemas contains schema settings

func ReadWhisperSchemas

func ReadWhisperSchemas(filename string) (WhisperSchemas, error)

ReadWhisperSchemas reads and parses a storage-schemas.conf file and returns a sorted schemas structure see

func (WhisperSchemas) Len

func (s WhisperSchemas) Len() int

func (WhisperSchemas) Less

func (s WhisperSchemas) Less(i, j int) bool

func (WhisperSchemas) Match

func (s WhisperSchemas) Match(metric string) (Schema, bool)

Match finds the schema for metric or returns false if none found

func (WhisperSchemas) Swap

func (s WhisperSchemas) Swap(i, j int)

Jump to

Keyboard shortcuts

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