mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-11-13 14:37:18 +00:00
Expose net/http/pprof handlers under /api/debug/pprof/* when the new
enablePprofEndpoint (JSON) / enable_pprof_endpoint (YAML) config option is true. The endpoint is disabled by default.
This commit is contained in:
1 parent
eaf9453897
commit
2d72d1f0d5
11 files changed
+341
No files matched your search
@@ -37,6 +37,7 @@ type ConfigStructure struct { // nolint: maligned
|
||||
ServeInAPIMode bool `json:"serveInAPIMode" yaml:"serve_in_api_mode"`
|
||||
EnableMetricsEndpoint bool `json:"enableMetricsEndpoint" yaml:"enable_metrics_endpoint"`
|
||||
EnableSwaggerEndpoint bool `json:"enableSwaggerEndpoint" yaml:"enable_swagger_endpoint"`
|
||||
EnablePprofEndpoint bool `json:"enablePprofEndpoint" yaml:"enable_pprof_endpoint"`
|
||||
AsyncAPI bool `json:"AsyncAPI" yaml:"async_api"` // OBSOLETE
|
||||
|
||||
// Database
|
||||
|
||||
@@ -95,6 +95,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
"serveInAPIMode": false,
|
||||
"enableMetricsEndpoint": false,
|
||||
"enableSwaggerEndpoint": false,
|
||||
"enablePprofEndpoint": false,
|
||||
"AsyncAPI": false,
|
||||
"databaseBackend": {
|
||||
"type": "",
|
||||
@@ -291,6 +292,7 @@ func (s *ConfigSuite) TestSaveYAML2Config(c *C) {
|
||||
"serve_in_api_mode: false\n"+
|
||||
"enable_metrics_endpoint: false\n"+
|
||||
"enable_swagger_endpoint: false\n"+
|
||||
"enable_pprof_endpoint: false\n"+
|
||||
"async_api: false\n"+
|
||||
"database_backend:\n"+
|
||||
" type: \"\"\n"+
|
||||
@@ -350,6 +352,7 @@ ppa_baseurl: http://ppa.launchpad.net
|
||||
serve_in_api_mode: true
|
||||
enable_metrics_endpoint: true
|
||||
enable_swagger_endpoint: true
|
||||
enable_pprof_endpoint: false
|
||||
async_api: true
|
||||
database_backend:
|
||||
type: etcd
|
||||
|
||||
Reference in new issue
Block a user