stats

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IncrementInstrument

type IncrementInstrument interface {
	Increment(ctx context.Context, labels map[string]string)
}

type MetricsProvider

type MetricsProvider interface {
	NewSetCounter(name string, labels []string) SetInstrument
	NewIncrementCounter(name string, labels []string) IncrementInstrument
	NewGauge(name string, labels []string) SetInstrument
}

func NewPrometheusMetricsProvider

func NewPrometheusMetricsProvider(ctx context.Context, opts *PrometheusOpts) (MetricsProvider, error)

type PrometheusOpts

type PrometheusOpts struct {
	Port        uint32
	MetricsPath string
}

type SetInstrument

type SetInstrument interface {
	Set(ctx context.Context, val int64, labels map[string]string)
}

Jump to

Keyboard shortcuts

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