simplemetrics

package
Version: v0.0.0-...-884d78e Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Count

type Count struct {
	atomic.Uint64
	// contains filtered or unexported fields
}

Count is a naive implementation of Count.

func (*Count) WithOverriddenTags

func (metric *Count) WithOverriddenTags(overrideTags Fields) metrics.Count

WithOverriddenTags implements Count.

type Fields

type Fields = fields.Fields

type Gauge

type Gauge struct {
	Family *gaugeFamily
	atomic.Float64
}

Gauge is a naive implementation of Gauge.

func (*Gauge) WithOverriddenTags

func (metric *Gauge) WithOverriddenTags(overrideTags Fields) metrics.Gauge

WithOverriddenTags implements Gauge.

type IntGauge

type IntGauge struct {
	Family *intGaugeFamily
	atomic.Int64
}

IntGauge is a naive implementation of IntGauge.

func (*IntGauge) WithOverriddenTags

func (metric *IntGauge) WithOverriddenTags(overrideTags Fields) metrics.IntGauge

WithOverriddenTags implements IntGauge.

type Metrics

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

Metrics is a naive implementation of Metrics

func New

func New() *Metrics

New returns an instance of Metrics.

func (*Metrics) Count

func (metrics *Metrics) Count(key string) metrics.Count

Count returns Count.

This method implements Metrics.

func (*Metrics) Gauge

func (metrics *Metrics) Gauge(key string) metrics.Gauge

Gauge returns Gauge.

This method implements Metrics.

func (*Metrics) IntGauge

func (metrics *Metrics) IntGauge(key string) metrics.IntGauge

IntGauge returns IntGauge.

This method implements Metrics.

func (Metrics) WithTag

func (metrics Metrics) WithTag(key string, value interface{}) metrics.Metrics

WithTag returns a scope of Metrics with added field.

This method implements Metrics.

func (Metrics) WithTags

func (metrics Metrics) WithTags(tags Fields) metrics.Metrics

WithTags returns a scope of Metrics with added fields.

This method implements Metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to