writer

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeWriter

type FakeWriter struct {
	WriteFunc func(ctx context.Context, name string, t time.Time, frames data.Frames, extraLabels map[string]string) error
}

func (FakeWriter) Write

func (w FakeWriter) Write(ctx context.Context, name string, t time.Time, frames data.Frames, extraLabels map[string]string) error

type Metric

type Metric struct {
	T int64
	V float64
}

Metric represents a Prometheus time series metric.

type Point

type Point struct {
	Name   string
	Labels map[string]string
	Metric Metric
}

Point is a logical representation of a single point in time for a Prometheus time series.

func PointsFromFrames

func PointsFromFrames(name string, t time.Time, frames data.Frames, extraLabels map[string]string) ([]Point, error)

type PrometheusWriter

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

func NewPrometheusWriter

func NewPrometheusWriter(l log.Logger) *PrometheusWriter

func (PrometheusWriter) Write

func (w PrometheusWriter) Write(ctx context.Context, name string, t time.Time, frames data.Frames, extraLabels map[string]string) error

Write writes the given frames to the Prometheus remote write endpoint. TODO: stub implementation, does not make any remote write calls.

type Writer

type Writer interface {
	Write(ctx context.Context, name string, t time.Time, frames data.Frames, extraLabels map[string]string) error
}

Jump to

Keyboard shortcuts

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