handler

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
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 CreateRouter

func CreateRouter(staticFolder string, securityConfig *security.Config, uiConfig *ui.Config, enabledMetrics bool) *mux.Router

func DevelopmentCORS

func DevelopmentCORS(next http.Handler) http.Handler

func FavIcon

func FavIcon(staticFolder string) http.HandlerFunc

FavIcon handles requests for /favicon.ico

func GzipHandler

func GzipHandler(next http.Handler) http.Handler

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 ResponseTimeBadge

func ResponseTimeBadge(writer http.ResponseWriter, request *http.Request)

ResponseTimeBadge handles the automatic generation of badge based on the group name and service name passed.

Valid values for {duration}: 7d, 24h, 1h

func ResponseTimeChart

func ResponseTimeChart(writer http.ResponseWriter, r *http.Request)

func ServiceStatus

func ServiceStatus(writer http.ResponseWriter, r *http.Request)

ServiceStatus retrieves a single ServiceStatus by group name and service name

func ServiceStatuses

func ServiceStatuses(writer http.ResponseWriter, r *http.Request)

ServiceStatuses handles requests to retrieve all service statuses Due to the size of the response, this function leverages a cache. Must not be wrapped by GzipHandler

func SinglePageApplication

func SinglePageApplication(staticFolder string, 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 service name passed.

Valid values for {duration}: 7d, 24h, 1h

Types

This section is empty.

Jump to

Keyboard shortcuts

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