Expose process PID in API and UI
Include the process PID in the API info payload and surface it in the frontend. apiHandler now adds app.Info["pid"] = os.Getpid(); openapi.yaml documents the new pid property as an integer with an example; www/index.html is updated to show pid alongside version and config. This aids debugging and identifying the running process.
This commit is contained in:
@@ -238,6 +238,7 @@ var mu sync.Mutex
|
||||
func apiHandler(w http.ResponseWriter, r *http.Request) {
|
||||
mu.Lock()
|
||||
app.Info["host"] = r.Host
|
||||
app.Info["pid"] = os.Getpid()
|
||||
mu.Unlock()
|
||||
|
||||
ResponseJSON(w, app.Info)
|
||||
|
||||
Reference in New Issue
Block a user