Add debug server to support pprof and expvar

If configured, a debug http server will be started to serve default registered
endpoints, such as pprof and expvar. The endpoint should be secured carefully
and not available to external traffic. It is disabled by default but the
development config has been modified to make it available on localhost.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2015-01-28 15:45:25 -08:00
parent e5de2594ad
commit 499382dd0b
3 changed files with 26 additions and 0 deletions

View file

@ -54,6 +54,14 @@ type Configuration struct {
// Certificate.
Key string `yaml:"key"`
} `yaml:"tls"`
// Debug configures the http debug interface, if specified. This can
// include services such as pprof, expvar and other data that should
// not be exposed externally. Left disabled by default.
Debug struct {
// Addr specifies the bind address for the debug server.
Addr string `yaml:"addr"`
} `yaml:"debug"`
} `yaml:"http"`
}