varz

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 8 Imported by: 2

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(statusCode int, 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) ActiveApps

func (x *RealVarz) ActiveApps() *stats.ActiveApps

func (*RealVarz) CaptureAppStats

func (x *RealVarz) CaptureAppStats(b *route.Endpoint, t time.Time)

func (*RealVarz) CaptureBadGateway

func (x *RealVarz) CaptureBadGateway()

func (*RealVarz) CaptureBadRequest

func (x *RealVarz) CaptureBadRequest()

func (*RealVarz) CaptureRoutingRequest

func (x *RealVarz) CaptureRoutingRequest(b *route.Endpoint)

func (*RealVarz) CaptureRoutingResponseLatency

func (x *RealVarz) CaptureRoutingResponseLatency(
	endpoint *route.Endpoint,
	statusCode int,
	startedAt time.Time,
	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, statusCode int, z time.Duration)

type Varz

type Varz interface {
	json.Marshaler

	ActiveApps() *stats.ActiveApps

	CaptureBadRequest()
	CaptureBadGateway()
	CaptureRoutingRequest(b *route.Endpoint)
	CaptureRoutingResponseLatency(b *route.Endpoint, statusCode int, startedAt time.Time, d time.Duration)
}

func NewVarz

func NewVarz(r *registry.RouteRegistry) Varz

Jump to

Keyboard shortcuts

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