metrics

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package metrics //

Package metrics //

Index

Constants

View Source
const (
	DispatcherFailedFlush  = "dispatcher.failFlush"
	DispatcherSuccessFlush = "dispatcher.successFlush"
	DispatcherRetryFlush   = "dispatcher.retryFlush"
	DispatcherQueueSize    = "dispatcher.queueSize"
)

DispatcherFailedFlush stores failFlush string

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	Add(delta float64)
}

Counter interface

type Gauge

type Gauge interface {
	Set(delta float64)
}

Gauge interface

type NoopCounter

type NoopCounter struct{}

NoopCounter implements Counter interface, provides minimal implementation

func (NoopCounter) Add

func (m NoopCounter) Add(value float64)

Add implements the method from Counter interface

type NoopGauge

type NoopGauge struct{}

NoopGauge implements Gauge interface, provides minimal implementation

func (NoopGauge) Set

func (m NoopGauge) Set(value float64)

Set implements the method from Gauge interface

type NoopRegistry

type NoopRegistry struct{}

NoopRegistry contains default metrics registry, provides minimal implementation

func NewNoopRegistry

func NewNoopRegistry() *NoopRegistry

NewNoopRegistry returns noop registry

func (*NoopRegistry) GetCounter

func (m *NoopRegistry) GetCounter(key string) Counter

GetCounter gets the Counter

func (*NoopRegistry) GetGauge

func (m *NoopRegistry) GetGauge(key string) Gauge

GetGauge gets the Gauge

type Registry

type Registry interface {
	GetCounter(name string) Counter
	GetGauge(name string) Gauge
}

Registry provides the interface for the metric registry

Jump to

Keyboard shortcuts

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