Documentation ¶
Index ¶
- func NewAdminHandler(prefix, appName string, routes ...RouteConfig) http.Handler
- func SetupAdminHandlerHTTPRouter(router HTTPRouter, prefix, name string, routeConfigs ...RouteConfig)
- func SetupAdminHandlerMux(mux *http.ServeMux, prefix, name string, routeConfigs ...RouteConfig)
- type BuildInfo
- type HTTPRouter
- type MetricsRegistry
- type Route
- type RouteConfig
- func Describe(desc string, rc RouteConfig) RouteConfig
- func RequireAuth(user, pass string, configs ...RouteConfig) RouteConfig
- func WithBuildInfo(buildInfo BuildInfo) RouteConfig
- func WithDefaults() RouteConfig
- func WithEnvironmentVariables() RouteConfig
- func WithForceGC() RouteConfig
- func WithGCStats() RouteConfig
- func WithGenericValue(path string, value interface{}) RouteConfig
- func WithGetHandler(path string, handler http.Handler) RouteConfig
- func WithGetHandlerFunc(path string, handler http.HandlerFunc) RouteConfig
- func WithHandler(method, path string, handler http.Handler) RouteConfig
- func WithHandlerFunc(method, path string, handler http.HandlerFunc) RouteConfig
- func WithHeapDump() RouteConfig
- func WithMetrics(registry MetricsRegistry) RouteConfig
- func WithPProfHandlers() RouteConfig
- func WithPingPong() RouteConfig
- func WithRedirect(from, to string) RouteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdminHandler ¶
func NewAdminHandler(prefix, appName string, routes ...RouteConfig) http.Handler
func SetupAdminHandlerHTTPRouter ¶
func SetupAdminHandlerHTTPRouter(router HTTPRouter, prefix, name string, routeConfigs ...RouteConfig)
func SetupAdminHandlerMux ¶
func SetupAdminHandlerMux(mux *http.ServeMux, prefix, name string, routeConfigs ...RouteConfig)
Types ¶
type HTTPRouter ¶
type MetricsRegistry ¶
type MetricsRegistry interface { GetOrRegister(string, interface{}) interface{} Register(string, interface{}) error RunHealthchecks() UnregisterAll() }
We actually dont use any of those methods, but we want some kind of type safety for the WithMetrics() method, without depending on the metrics package.
type RouteConfig ¶
type RouteConfig struct { Route // contains filtered or unexported fields }
func Describe ¶
func Describe(desc string, rc RouteConfig) RouteConfig
func RequireAuth ¶
func RequireAuth(user, pass string, configs ...RouteConfig) RouteConfig
func WithBuildInfo ¶
func WithBuildInfo(buildInfo BuildInfo) RouteConfig
func WithDefaults ¶
func WithDefaults() RouteConfig
func WithEnvironmentVariables ¶
func WithEnvironmentVariables() RouteConfig
func WithForceGC ¶
func WithForceGC() RouteConfig
func WithGCStats ¶
func WithGCStats() RouteConfig
func WithGenericValue ¶
func WithGenericValue(path string, value interface{}) RouteConfig
func WithGetHandler ¶
func WithGetHandler(path string, handler http.Handler) RouteConfig
func WithGetHandlerFunc ¶
func WithGetHandlerFunc(path string, handler http.HandlerFunc) RouteConfig
func WithHandler ¶
func WithHandler(method, path string, handler http.Handler) RouteConfig
func WithHandlerFunc ¶
func WithHandlerFunc(method, path string, handler http.HandlerFunc) RouteConfig
func WithHeapDump ¶
func WithHeapDump() RouteConfig
func WithMetrics ¶
func WithMetrics(registry MetricsRegistry) RouteConfig
func WithPProfHandlers ¶
func WithPProfHandlers() RouteConfig
func WithPingPong ¶
func WithPingPong() RouteConfig
func WithRedirect ¶
func WithRedirect(from, to string) RouteConfig
func (RouteConfig) Describe ¶
func (rc RouteConfig) Describe(description string) RouteConfig
func (RouteConfig) Wildcard ¶
func (rc RouteConfig) Wildcard(wildcard bool) RouteConfig
Click to show internal directories.
Click to hide internal directories.