prompb

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 6 Imported by: 4

README

The compiled protobufs are version controlled and you won't normally need to re-compile them when building Prometheus.

If however you have modified the defs and do need to re-compile, run ./scripts/genproto.sh from the parent dir.

In order for the script to run, you'll need protoc (version 3.5) in your PATH, and the following Go packages installed:

  • github.com/gogo/protobuf
  • github.com/gogo/protobuf/protoc-gen-gogofast
  • github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/
  • github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
  • golang.org/x/tools/cmd/goimports

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadSnappy

func ReadSnappy(dst []byte, r io.Reader, maxSize int64) ([]byte, error)

ReadSnappy reads r, unpacks it using snappy, appends it to dst and returns the result.

Types

type Label

type Label struct {
	Name  []byte
	Value []byte
}

Label is a timeseries label

func (*Label) Unmarshal

func (m *Label) Unmarshal(dAtA []byte) error

Unmarshal unmarshals Label from dAtA.

type Sample

type Sample struct {
	Value     float64
	Timestamp int64
}

Sample is a timeseries sample.

func (*Sample) Unmarshal

func (m *Sample) Unmarshal(dAtA []byte) error

Unmarshal unmarshals sample from dAtA.

type TimeSeries

type TimeSeries struct {
	Labels  []Label
	Samples []Sample
}

TimeSeries is a timeseries.

func (*TimeSeries) Unmarshal

func (m *TimeSeries) Unmarshal(dAtA []byte, dstLabels []Label, dstSamples []Sample) ([]Label, []Sample, error)

Unmarshal unmarshals timeseries from dAtA.

type WriteRequest

type WriteRequest struct {
	Timeseries []TimeSeries
	// contains filtered or unexported fields
}

WriteRequest represents Prometheus remote write API request

func (*WriteRequest) Reset

func (wr *WriteRequest) Reset()

Reset resets wr.

func (*WriteRequest) Unmarshal

func (m *WriteRequest) Unmarshal(dAtA []byte) error

Unmarshal unmarshals m from dAtA.

Jump to

Keyboard shortcuts

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