walgen

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTSDBWAL

func GenerateTSDBWAL(logger log.Logger, dir string, config Config) error

Types

type Config

type Config struct {
	InputSeries    []Series
	Retention      time.Duration
	ScrapeInterval time.Duration
}

TODO(bwplotka): Allow more realistic output.

type QueryData

type QueryData struct {
	ResultType model.ValueType `json:"resultType"`
	Result     model.Vector    `json:"result"`
}

type Series

type Series struct {
	Type string // gauge, counter (if counter we treat below as rate aim).

	Characteristics seriesgen.Characteristics

	// Result is an exact Prometheus HTTP query result that would be used to generate series' metrics labels.
	Result QueryData
	// Replicate multiples this set given number of times. For example if result has 10 metrics and replicate is 10 we will
	// have 100 unique series.
	Replicate int
}

type Set

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

func (*Set) At

func (s *Set) At() seriesgen.Series

func (*Set) Err

func (s *Set) Err() error

func (*Set) Next

func (s *Set) Next() bool

Jump to

Keyboard shortcuts

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