exporter

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 4 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 {
	// Groups is list of groupcache groups to export metrics.
	//
	// This is one example about how to create a group suitable to Groups:
	// import "github.com/udhos/groupcache_exporter/groupcache/modernprogram"
	// cache := ... // create groupcache group
	// groupStat := modernprogram.New(cache)
	//
	Groups []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
}

Options define exporter options.

Jump to

Keyboard shortcuts

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