route

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlogGetter

func GlogGetter() (string, error)

GlogGetter is used to get glog level.

func GlogSetter

func GlogSetter(val string) (string, error)

GlogSetter is a setter to set glog level.

func StringFlagHandler

func StringFlagHandler(setter StringFlagSetterFunc, getter StringFlagGetterFunc) http.HandlerFunc

StringFlagHandler wraps an http Handler to set string type flag.

Types

type DebugFlags

type DebugFlags struct{}

DebugFlags adds handlers for flags under /debug/flags.

func (DebugFlags) Index

func (f DebugFlags) Index(w http.ResponseWriter, r *http.Request)

Index responds with the `/debug/flags` request. For example, "/debug/flags/v" serves the "--v" flag. Index responds to a request for "/debug/flags/" with an HTML page listing the available flags.

func (DebugFlags) Install

func (f DebugFlags) Install(c *mux.PathRecorderMux, flag string, handler func(http.ResponseWriter, *http.Request))

Install registers the APIServer's flags handler.

type StringFlagGetterFunc

type StringFlagGetterFunc func() (string, error)

StringFlagGetterFunc is a func used for getting string type flag.

type StringFlagSetterFunc

type StringFlagSetterFunc func(string) (string, error)

StringFlagSetterFunc is a func used for setting string type flag.

Jump to

Keyboard shortcuts

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