metrics

package
v0.0.0-...-f584327 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 2 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 interface {

	// GetGrpcServerOption returns the grpc.ServerOptions for metrics interceptors
	GetGrpcServerOption() []grpc.ServerOption

	// GetHttpHandlers returns the map from path to handler register some handle for metrics
	GetHttpHandlers() map[string]http.Handler

	// EmitCounter emits the count
	EmitCounter(name string, value interface{}, tags ...T) error

	// EmitGauge emits the state
	EmitGauge(name string, value interface{}, tags ...T) error

	// EmitHistogram emits the histogram
	EmitHistogram(name string, value interface{}, tags ...T) error // histogram
}

Metrics abstracts metrics common define

type T

type T struct {
	Name  string
	Value string
}

func Tag

func Tag(name, value string) T

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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