dvfs agent 0.1

This commit is contained in:
2026-04-26 12:38:53 +02:00
commit d0b12d668d
5 changed files with 232 additions and 0 deletions

13
agent/middleware.go Normal file
View File

@@ -0,0 +1,13 @@
package main
import (
"log/slog"
"net/http"
)
func logRequests(logger *slog.Logger, handler http.Handler) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
logger.Info("request", "method", r.Method, "url", r.URL, "remote-addr", r.RemoteAddr)
handler.ServeHTTP(w, r)
}
}