metrics

package
v0.7.1-dev Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics provides an interface to log operational counters

func NewMetrics

func NewMetrics(logger log.FieldLogger, logPeriod time.Duration) *Metrics

NewMetrics creates a Metrics object using the provided logger and starts logging every provided logPeriod

func (*Metrics) Add

func (m *Metrics) Add(name string, val int)

Add increments the specified field by the specified value

Jump to

Keyboard shortcuts

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