apiserver

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 License: NCSA Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HEALTHY_OK_RESPONSE_PERCENT float64 = 40.0
View Source
var HEALTHY_RESPONSE_TIME float64 = 3.0
View Source
var MINIMUM_NUM_RESPONSES int = 100

Functions

func GetHealthStats

func GetHealthStats(stats_middleware *stats.Stats) http.HandlerFunc

Endpoint which returns health stats Returns HTTP200 when the service is healthy Returns HTTP503 when the service is unhealthy

func IsHealthy

func IsHealthy(health_stats *stats.Data) bool

Determines if a service is healthy based on current health stats

func Reload added in v0.3.0

func Reload(initialize func() error) http.HandlerFunc

Reinitializes the service causing configuration variables to be reread

func StartServer

func StartServer(address string, router *mux.Router, name string, initialize func() error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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