mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 02:30:45 +00:00
20 lines
394 B
Go
20 lines
394 B
Go
package app
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
// Raw report handler
|
|
func makeRawReportHandler(rep Reporter) CtxHandlerFunc {
|
|
return func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
|
|
report, err := rep.Report(ctx)
|
|
if err != nil {
|
|
respondWith(w, http.StatusInternalServerError, err.Error())
|
|
return
|
|
}
|
|
respondWith(w, http.StatusOK, report)
|
|
}
|
|
}
|