varz

package
v0.0.0-...-4b17972 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2013 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpMetric

type HttpMetric struct {
	Requests metrics.Counter
	Rate     metrics.Meter

	Responses2xx metrics.Counter
	Responses3xx metrics.Counter
	Responses4xx metrics.Counter
	Responses5xx metrics.Counter
	ResponsesXxx metrics.Counter
	Latency      metrics.Histogram
}

func NewHttpMetric

func NewHttpMetric() *HttpMetric

func (*HttpMetric) CaptureRequest

func (x *HttpMetric) CaptureRequest()

func (*HttpMetric) CaptureResponse

func (x *HttpMetric) CaptureResponse(response *http.Response, duration time.Duration)

func (*HttpMetric) MarshalJSON

func (x *HttpMetric) MarshalJSON() ([]byte, error)

type RealVarz

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

func (*RealVarz) CaptureBadGateway

func (x *RealVarz) CaptureBadGateway(req *http.Request)

func (*RealVarz) CaptureBadRequest

func (x *RealVarz) CaptureBadRequest(req *http.Request)

func (*RealVarz) CaptureRoutingRequest

func (x *RealVarz) CaptureRoutingRequest(b *route.Endpoint, req *http.Request)

func (*RealVarz) CaptureRoutingResponse

func (x *RealVarz) CaptureRoutingResponse(endpoint *route.Endpoint, response *http.Response, duration time.Duration)

func (*RealVarz) MarshalJSON

func (x *RealVarz) MarshalJSON() ([]byte, error)

type TaggedHttpMetric

type TaggedHttpMetric map[string]*HttpMetric

func NewTaggedHttpMetric

func NewTaggedHttpMetric() TaggedHttpMetric

func (TaggedHttpMetric) CaptureRequest

func (x TaggedHttpMetric) CaptureRequest(t string)

func (TaggedHttpMetric) CaptureResponse

func (x TaggedHttpMetric) CaptureResponse(t string, y *http.Response, z time.Duration)

type Varz

type Varz interface {
	json.Marshaler

	CaptureBadRequest(req *http.Request)
	CaptureBadGateway(req *http.Request)
	CaptureRoutingRequest(b *route.Endpoint, req *http.Request)
	CaptureRoutingResponse(b *route.Endpoint, res *http.Response, d time.Duration)
}

func NewVarz

func NewVarz(r *registry.Registry) Varz

Jump to

Keyboard shortcuts

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