Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HostID = dflag.DynString(flag.CommandLine, "hostid", "", "host id to show in debug-host output") // optional fortio debug virtual host. DebugHost = dflag.DynString(flag.CommandLine, "debug-host", "", "`hostname` to serve echo debug info on if non-empty (ex: debug.fortio.org)") )
View Source
var GzipDebugHandler = fhttp.Gzip(http.HandlerFunc(SafeDebugHandler))
GzipDebugHandler is a handler wrapping SafeDebugHandler with optional gzip compression.
Functions ¶
func DebugOnHostHandler ¶ added in v1.8.0
func DebugOnHostHandler(normalHandler http.HandlerFunc) http.HandlerFunc
func GetRoutes ¶
GetRoutes gets the current routes from the dynamic flag routes.json as object (deserialized).
func PrintRoutes ¶
func PrintRoutes()
PrintRoutes prints the current value of the routes config (dflag).
func ReverseProxy ¶
func ReverseProxy() *httputil.ReverseProxy
ReverseProxy returns a new reverse proxy which will route based on the config/dflags.
func SafeDebugHandler ¶ added in v1.6.1
func SafeDebugHandler(w http.ResponseWriter, r *http.Request)
DebugHandler is similar to Fortio's DebugHandler, it returns debug/useful info to http client. but doesn't have some of the extra sensitive info like env dump and host name or echo delay or header setting options.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.