metrics

package
v0.0.0-...-795d1f5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MeterByStatus

type MeterByStatus struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MeterByStatus is an http.Handler that counts responses by their HTTP status code via go-metrics. This code is ripped blatantly from tigertonic, and converted to meters.

func MeteredByStatus

func MeteredByStatus(
	handler http.Handler,
	name string,
	registry metrics.Registry,
) *MeterByStatus

MeteredByStatus returns an http.Handler that passes requests to an underlying http.Handler and then counts the response by its HTTP status code via go-metrics.

func (*MeterByStatus) ServeHTTP

func (c *MeterByStatus) ServeHTTP(w0 http.ResponseWriter, r *http.Request)

ServeHTTP passes the request to the underlying http.Handler and then counts the response by its HTTP status code via go-metrics.

type TimeByStatus

type TimeByStatus struct {
	sync.Mutex
	// contains filtered or unexported fields
}

TimeByStatus is an http.Handler that times responses by their HTTP status code via go-metrics. This code is ripped blatantly from tigertonic, and converted to meters.

func TimedByStatus

func TimedByStatus(
	handler http.Handler,
	name string,
	registry metrics.Registry,
) *TimeByStatus

TimedByStatus returns an http.Handler that passes requests to an underlying http.Handler and then times the response by its HTTP status code via go-metrics.

func (*TimeByStatus) ServeHTTP

func (c *TimeByStatus) ServeHTTP(w0 http.ResponseWriter, r *http.Request)

ServeHTTP passes the request to the underlying http.Handler and then times the response by its HTTP status code via go-metrics.

Jump to

Keyboard shortcuts

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