metricexporter

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMetricGatherer

func DefaultMetricGatherer() ([]*dto.MetricFamily, time.Time, error)

func WithMetricGatherer

func WithMetricGatherer(g MetricGatherer) func(*MetricsExporter)

Types

type MetricGatherer

type MetricGatherer func() ([]*dto.MetricFamily, time.Time, error)

type MetricSender

type MetricSender interface {
	SendMetrics(ctx context.Context, gatherTime time.Time, metricFamilies []*dto.MetricFamily) error
}

type MetricsExporter

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

func New

func New(
	log *logrus.Entry,
	sender MetricSender,
	exportInterval time.Duration,
	opts ...func(*MetricsExporter),
) *MetricsExporter

func (*MetricsExporter) Run

func (me *MetricsExporter) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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