exporter

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 5 Imported by: 3

Documentation

Overview

Package exporter implements datadog exporter for groupcache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInterface added in v0.0.2

type ClientInterface interface {
	// Gauge measures the value of a metric at a particular time.
	Gauge(name string, value float64, tags []string, rate float64) error

	// Count tracks how many times something happened per second.
	Count(name string, value int64, tags []string, rate float64) error

	// Close the client connection.
	Close() error
}

ClientInterface is implemented by *statsd.Client. Simplified version of statsd.ClientInterface.

type Exporter

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

Exporter exports stats.

func New

func New(options Options) *Exporter

New creates an exporter.

func (*Exporter) Close

func (e *Exporter) Close() error

Close finishes the exporter.

type Options

type Options struct {
	// ListGroups function must provide current list of groupcache groups.
	ListGroups func() []groupcache_exporter.GroupStatistics

	// Client interface is implemented by *statsd.Client.
	Client ClientInterface

	// SampleRate defaults to 1.
	SampleRate float64

	// ExportInterval defaults to 1 minute.
	ExportInterval time.Duration

	// HostnameTagKey defaults to "pod_name".
	HostnameTagKey string

	// DisableHostnameTag prevents adding hostname tag $HostnameTagKey:$hostname.
	DisableHostnameTag bool

	// Debug enables debugging logs.
	Debug bool
}

Options define exporter options.

Jump to

Keyboard shortcuts

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