routehandler

package
v0.0.0-...-950c997 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteHandler

type RouteHandler struct {
	// contains filtered or unexported fields
}

RouteHandler as a collection of route handlers

func NewRouteHandler

func NewRouteHandler(
	statsdClient statsdclient.StatsdClientInterface,
	metricPrefix string,
) *RouteHandler

NewRouteHandler creates collection of route handlers

func (*RouteHandler) HandleHeartbeatRequest

func (routeHandler *RouteHandler) HandleHeartbeatRequest(w http.ResponseWriter, r *http.Request)

Handle heartbeat request

func (*RouteHandler) HandleMetric

func (routeHandler *RouteHandler) HandleMetric(
	w http.ResponseWriter,
	r *http.Request,
	metricType string,
	metricKeySuffix string,
)

HandleMetric reads count, gauge, timing and set metrics from HTTP and sent them to StatsD

Jump to

Keyboard shortcuts

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