router

package
v5.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeWriteRequest added in v5.2.0

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

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

func New

func New(version string, reloadFunc func()) *gin.Engine

Types

type DatadogMetric added in v5.2.1

type DatadogMetric struct {
	Metric string         `json:"metric"`
	Points []DatadogPoint `json:"points"`
	Host   string         `json:"host"`
	Tags   []string       `json:"tags,omitempty"`
}

func (*DatadogMetric) Clean added in v5.2.1

func (m *DatadogMetric) Clean() error

func (*DatadogMetric) ToProm added in v5.2.1

func (m *DatadogMetric) ToProm() (*prompb.TimeSeries, string, error)

type DatadogPoint added in v5.2.1

type DatadogPoint [2]float64

type FalconMetric added in v5.3.0

type FalconMetric struct {
	Metric       string      `json:"metric"`
	Endpoint     string      `json:"endpoint"`
	Timestamp    int64       `json:"timestamp"`
	ValueUnTyped interface{} `json:"value"`
	Value        float64     `json:"-"`
	Tags         string      `json:"tags"`
}

func (*FalconMetric) Clean added in v5.3.0

func (m *FalconMetric) Clean(ts int64) error

func (*FalconMetric) ToProm added in v5.3.0

func (m *FalconMetric) ToProm() (*prompb.TimeSeries, string, error)

type HTTPMetric

type HTTPMetric struct {
	Metric       string            `json:"metric"`
	Timestamp    int64             `json:"timestamp"`
	ValueUnTyped interface{}       `json:"value"`
	Value        float64           `json:"-"`
	Tags         map[string]string `json:"tags"`
}

func (*HTTPMetric) Clean

func (m *HTTPMetric) Clean(ts int64) error

func (*HTTPMetric) ToProm

func (m *HTTPMetric) ToProm() (*prompb.TimeSeries, error)

type TimeSeries added in v5.2.1

type TimeSeries struct {
	Series []*DatadogMetric `json:"series"`
}

Jump to

Keyboard shortcuts

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