metrics

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2019 License: Apache-2.0 Imports: 1 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Dummy = &dummy{}

Dummy is a dummy recorder.

Functions

This section is empty.

Types

type Recorder

type Recorder interface {
	// ObserveHTTPRequestDuration measures the duration of an HTTP request.
	ObserveHTTPRequestDuration(id string, duration time.Duration, method, code string)
	// ObserveHTTPResponseSize measures the size of an HTTP response in bytes.
	ObserveHTTPResponseSize(id string, sizeBytes int64, method, code string)
	// AddInflightRequests increments and decrements the number of inflight request being
	// processed.
	AddInflightRequests(id string, quantity int)
}

Recorder knows how to record and measure the metrics. This Interface has the required methods to be used with the HTTP middlewares.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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