MCPcopy
hub / github.com/livekit/livekit / debugInfo

Method debugInfo

pkg/service/server.go:383–398  ·  view source on GitHub ↗
(w http.ResponseWriter, _ *http.Request)

Source from the content-addressed store, hash-verified

381}
382
383func (s *LivekitServer) debugInfo(w http.ResponseWriter, _ *http.Request) {
384 s.roomManager.lock.RLock()
385 info := make([]map[string]any, 0, len(s.roomManager.rooms))
386 for _, room := range s.roomManager.rooms {
387 info = append(info, room.DebugInfo())
388 }
389 s.roomManager.lock.RUnlock()
390
391 b, err := json.Marshal(info)
392 if err != nil {
393 w.WriteHeader(400)
394 _, _ = w.Write([]byte(err.Error()))
395 } else {
396 _, _ = w.Write(b)
397 }
398}
399
400func (s *LivekitServer) defaultHandler(w http.ResponseWriter, r *http.Request) {
401 if r.URL.Path == "/" {

Callers

nothing calls this directly

Calls 3

DebugInfoMethod · 0.65
WriteMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected