mirror of
https://github.com/PeernetOfficial/Cmd.git
synced 2026-07-18 11:27:51 +01:00
Add debug API. This can be used for profiling.
This commit is contained in:
4
API.go
4
API.go
@@ -44,6 +44,10 @@ func startAPI(backend *core.Backend, apiListen []string, apiKey uuid.UUID) {
|
||||
api.AllowKeyInParam = append(api.AllowKeyInParam, "/console")
|
||||
api.Router.HandleFunc("/console", apiConsole(backend)).Methods("GET")
|
||||
api.Router.HandleFunc("/shutdown", apiShutdown(backend)).Methods("GET")
|
||||
|
||||
if config.DebugAPI {
|
||||
attachDebugAPI(api)
|
||||
}
|
||||
}
|
||||
|
||||
// parseCmdParams parses the "-webapi", "-apikey", and "-watchpid" command line parameters.
|
||||
|
||||
Reference in New Issue
Block a user