routes

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringFlagPutHandler

func StringFlagPutHandler(setter StringFlagSetterFunc) http.HandlerFunc

StringFlagPutHandler wraps an http Handler to set string type flag.

Types

type DebugFlags

type DebugFlags struct {
	// contains filtered or unexported fields
}

DebugFlags adds handlers for flags under /debug/flags.

func NewDebugFlags

func NewDebugFlags(c *mux.PathRecorderMux) DebugFlags

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(flag string, handler func(http.ResponseWriter, *http.Request))

Install registers the APIServer's flags handler.

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