Add debug API. This can be used for profiling.

This commit is contained in:
Kleissner
2022-01-06 00:05:27 +01:00
parent 4b89138d36
commit adce6fee5c
7 changed files with 136 additions and 4 deletions

View File

@@ -19,7 +19,8 @@ const appName = "Peernet Cmd"
var config struct {
// Log settings
ErrorOutput int `yaml:"ErrorOutput"` // 0 = Log file (default), 1 = Command line, 2 = Log file + command line, 3 = None
ErrorOutput int `yaml:"ErrorOutput"` // 0 = Log file (default), 1 = Command line, 2 = Log file + command line, 3 = None
DebugAPI bool `yaml:"DebugAPI"` // Enables the debug API which allows profiling. Do not enable in production. Only available if compiled with debug tag.
// API settings
APIListen []string `yaml:"APIListen"` // WebListen is in format IP:Port and declares where the web-interface should listen on. IP can also be ommitted to listen on any.