prometheus

package
v0.0.0-...-50c083d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeWriteRequest

func DecodeWriteRequest(r io.Reader) (*prompb.WriteRequest, error)

DecodeWriteRequest from an io.Reader into a prompb.WriteRequest, handling snappy decompression.

func ProcessMetrics

func ProcessMetrics(r io.Reader) (*pb.MetricsBatch, error)

Types

type MetricsHandler

type MetricsHandler struct {
	Options Options
	Store   MetricsStore
}

func NewMetricsHandler

func NewMetricsHandler(options Options, store []byte) *MetricsHandler

func (*MetricsHandler) RemoteWriteHandler

func (mh *MetricsHandler) RemoteWriteHandler(w http.ResponseWriter, r *http.Request)

type MetricsStatus

type MetricsStatus struct {
	Msg          string    `json:"message"`
	LastModified time.Time `json:"last_modified"`
}

type MetricsStore

type MetricsStore []byte

type Options

type Options map[string]string

Jump to

Keyboard shortcuts

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