prometheus

package
v0.0.0-...-a212069 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBenchmark

func NewBenchmark(promSpecificConfig *SpecificConfig, dataSourceConfig *source.DataSourceConfig) (targets.Benchmark, error)

func NewTarget

func NewTarget() targets.ImplementedTarget

Types

type Batch

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

Batch implements targets.Batch interface

func (*Batch) Append

func (pb *Batch) Append(item data.LoadedPoint)

func (*Batch) Len

func (pb *Batch) Len() uint

type BatchFactory

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

PrometheusBatchFactory implements Factory interface

func (*BatchFactory) New

func (pbf *BatchFactory) New() targets.Batch

type Benchmark

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

Benchmark implements targets.Benchmark interface

func (*Benchmark) GetBatchFactory

func (pm *Benchmark) GetBatchFactory() targets.BatchFactory

func (*Benchmark) GetDBCreator

func (pm *Benchmark) GetDBCreator() targets.DBCreator

func (*Benchmark) GetDataSource

func (pm *Benchmark) GetDataSource() targets.DataSource

func (*Benchmark) GetPointIndexer

func (pm *Benchmark) GetPointIndexer(maxPartitions uint) targets.PointIndexer

func (*Benchmark) GetProcessor

func (pm *Benchmark) GetProcessor() targets.Processor

type Client

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

Client is a wrapper around http.Client Client sends data to Prometheus adapter

func NewClient

func NewClient(urlStr string, timeout time.Duration) (*Client, error)

NewClient ..

func (*Client) Post

func (c *Client) Post(series []prompb.TimeSeries) error

Post sends POST request to Prometheus adapter

type FileDataSource

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

FileDataSource implements the source.DataSource interface

func (*FileDataSource) Headers

func (*FileDataSource) NextItem

func (pd *FileDataSource) NextItem() data.LoadedPoint

type Iterator

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

Iterator iterates over binary data and enables lazy access over protobuf messages

func NewPrometheusIterator

func NewPrometheusIterator(reader *bufio.Reader) (*Iterator, error)

NewPrometheusIterator creates iterator and reads version information from underlying reader

func (*Iterator) HasNext

func (pi *Iterator) HasNext() bool

HasNext returns true if there are more protobuf messages to read

func (*Iterator) Next

func (pi *Iterator) Next() (*prompb.TimeSeries, error)

Next returns next protobuf message

type Processor

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

PrometheusProcessor implements load.Processor interface

func (*Processor) Init

func (pp *Processor) Init(_ int, _, _ bool)

func (*Processor) ProcessBatch

func (pp *Processor) ProcessBatch(b targets.Batch, doLoad bool) (uint64, uint64)

ProcessBatch ..

type Serializer

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

func (*Serializer) Serialize

func (ps *Serializer) Serialize(p *data.Point, w io.Writer) error

Serialize point into our custom binary format

type SpecificConfig

type SpecificConfig struct {
	AdapterWriteURL string `yaml:"adapter-write-url" mapstructure:"adapter-write-url"`
	UseCurrentTime  bool   `yaml:"use-current-time" mapstructure:"use-current-time"`
}

Jump to

Keyboard shortcuts

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