Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SanitizeEnv is the set of environment variables to sanitize their values // in the Env http handler. SanitizeEnv flagutil.StringSetFlag // OmitEnv is the set of environment variables to omit entirely in the Env // http handler. OmitEnv flagutil.StringSetFlag )
Functions ¶
func Cluster ¶ added in v0.12.0
func Cluster(api API) http.HandlerFunc
Cluster returns an http.HandlerFunc for the /debug/cluster/{cluster_id} route.
func Clusters ¶ added in v0.12.0
func Clusters(api API) http.HandlerFunc
Clusters returns an http.HandlerFunc for the /debug/clusters route.
func Env ¶
func Env(w http.ResponseWriter, r *http.Request)
Env responds with a plaintext listing of key=value pairs of the environment variables, sorted by key name.
If a variable appears in OmitEnv, it is excluded entirely. If a variable appears in SanitizeEnv, its value is replaced with a sanitized string, including if there was no value set in the environment.
Types ¶
type API ¶ added in v0.12.0
type API interface { // Cluster returns a cluster by id, with the same semantics as a map lookup. Cluster(id string) (*cluster.Cluster, bool) // Clusters returns a slice of all clusters in the API. Clusters() []*cluster.Cluster }
API defines the interface needed to provide debug info for a vtadmin.API. This is implemented by a private wrapper struct in package vtadmin, to prevent debug needs from polluting the public interface of the actual API.