mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-06 02:56:51 +00:00
19 lines
409 B
Go
19 lines
409 B
Go
package api
|
|
|
|
import "net/http"
|
|
|
|
func (s *Server) configReadHandler(w http.ResponseWriter, r *http.Request) {
|
|
_, span := s.tracer.Start(r.Context(), "configReadHandler")
|
|
defer span.End()
|
|
|
|
files := make(map[string]string)
|
|
if watcher != nil {
|
|
watcher.Cache.Range(func(key interface{}, value interface{}) bool {
|
|
files[key.(string)] = value.(string)
|
|
return true
|
|
})
|
|
}
|
|
|
|
s.JSONResponse(w, r, files)
|
|
}
|