move HTTP recorder to an internal library (#16128)

This commit is contained in:
Anis Elleuch
2022-11-28 19:20:27 +01:00
committed by GitHub
parent 98a67a3776
commit 1f1dcdce65
8 changed files with 215 additions and 165 deletions

View File

@@ -23,7 +23,7 @@ import (
"sync"
"sync/atomic"
"github.com/minio/minio/internal/logger"
xhttp "github.com/minio/minio/internal/http"
"github.com/prometheus/client_golang/prometheus"
)
@@ -295,7 +295,7 @@ func (st *HTTPStats) toServerHTTPStats() ServerHTTPStats {
}
// Update statistics from http request and response data
func (st *HTTPStats) updateStats(api string, r *http.Request, w *logger.ResponseWriter) {
func (st *HTTPStats) updateStats(api string, r *http.Request, w *xhttp.ResponseRecorder) {
// Ignore non S3 requests
if strings.HasSuffix(r.URL.Path, minioReservedBucketPathWithSlash) {
return