Documentation ¶
Overview ¶
This is not a replacement for expvar, but instead adds some extra stuff to the variables that are exported (typically to /debug/vars), including:
env: a map of safelisted environment variables uptime: some variables related to process uptime including: start_time: time of roughly when the process started (UTC) uptime: start time minus server time (UTC) uptime_ms: uptime (above) in milliseconds server_time: time according to the server process (UTC)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToEnvSafelist ¶
func AddToEnvSafelist(keys ...string)
func HandleExpvars ¶
func HandleExpvars(w http.ResponseWriter, r *http.Request)
HandleExpvars does the same thing as the private expvar.expvarHandler, but exposed as public for pluggability into other web frameworks and generates json in a maybe slightly kinda more sane way (???).
func RemoveFromEnvSafelist ¶
func RemoveFromEnvSafelist(keys ...string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.