web

package
v0.0.0-...-2428db5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthzRoute

func HealthzRoute(r *mux.Router, handler *healthHandler)

func MetricsRoute

func MetricsRoute(r *mux.Router, handler *metricsHandler)

func NewHealthHandler

func NewHealthHandler(healthCheckTarget HealthCheckable) *healthHandler

NewHealthHandler creates a handler for the Health endpoints healthCheckTarget must contain an implementation that will be utilized to signal that the service is ready to accept requests.

func NewMetricsHandler

func NewMetricsHandler(ms MetricsServiceInterface) *metricsHandler

func NewRouter

func NewRouter() *mux.Router

NewRouter returns the router created by the internal newRouter function Don't expose it directly in case we need to pass extra config that doesn't apply to the router.

Types

type HealthCheckable

type HealthCheckable interface {
	IsHealthy() error
}

type MetricsServiceInterface

type MetricsServiceInterface interface {
	Create(m mobile.Metric) (mobile.Metric, error)
}

Jump to

Keyboard shortcuts

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