Documentation ¶
Index ¶
- Constants
- func CreateRouter(cfg *config.Config) *mux.Router
- func DevelopmentCORS(next http.Handler) http.Handler
- func EndpointStatus(writer http.ResponseWriter, r *http.Request)
- func EndpointStatuses(cfg *config.Config) http.HandlerFunc
- func GzipHandler(next http.Handler) http.Handler
- func GzipHandlerFunc(next http.HandlerFunc) http.HandlerFunc
- func HealthBadge(writer http.ResponseWriter, request *http.Request)
- func ResponseTimeBadge(config *config.Config) http.HandlerFunc
- func ResponseTimeChart(writer http.ResponseWriter, r *http.Request)
- func SinglePageApplication(ui *ui.Config) http.HandlerFunc
- func UptimeBadge(writer http.ResponseWriter, request *http.Request)
- type ConfigHandler
Constants ¶
const ( HealthStatusUp = "up" HealthStatusDown = "down" HealthStatusUnknown = "?" )
const ( // DefaultPage is the default page to use if none is specified or an invalid value is provided DefaultPage = 1 // DefaultPageSize is the default page siZE to use if none is specified or an invalid value is provided DefaultPageSize = 20 // MaximumPageSize is the maximum page size allowed MaximumPageSize = common.MaximumNumberOfResults )
Variables ¶
This section is empty.
Functions ¶
func EndpointStatus ¶
func EndpointStatus(writer http.ResponseWriter, r *http.Request)
EndpointStatus retrieves a single core.EndpointStatus by group and endpoint name
func EndpointStatuses ¶
func EndpointStatuses(cfg *config.Config) http.HandlerFunc
EndpointStatuses handles requests to retrieve all EndpointStatus Due to the size of the response, this function leverages a cache. Must not be wrapped by GzipHandler
func GzipHandler ¶
GzipHandler compresses the response of a given http.Handler if the request's headers specify that the client supports gzip encoding
func GzipHandlerFunc ¶
func GzipHandlerFunc(next http.HandlerFunc) http.HandlerFunc
GzipHandlerFunc compresses the response of a given http.HandlerFunc if the request's headers specify that the client supports gzip encoding
func HealthBadge ¶
func HealthBadge(writer http.ResponseWriter, request *http.Request)
HealthBadge handles the automatic generation of badge based on the group name and endpoint name passed.
func ResponseTimeBadge ¶
func ResponseTimeBadge(config *config.Config) http.HandlerFunc
ResponseTimeBadge handles the automatic generation of badge based on the group name and endpoint name passed.
Valid values for {duration}: 7d, 24h, 1h
func ResponseTimeChart ¶
func ResponseTimeChart(writer http.ResponseWriter, r *http.Request)
func SinglePageApplication ¶
func SinglePageApplication(ui *ui.Config) http.HandlerFunc
func UptimeBadge ¶
func UptimeBadge(writer http.ResponseWriter, request *http.Request)
UptimeBadge handles the automatic generation of badge based on the group name and endpoint name passed.
Valid values for {duration}: 7d, 24h, 1h
Types ¶
type ConfigHandler ¶
type ConfigHandler struct {
// contains filtered or unexported fields
}
ConfigHandler is a handler that returns information for the front end of the application.
func (ConfigHandler) ServeHTTP ¶
func (handler ConfigHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)