1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/pkg/webhooks/handlers/monitor.go

16 lines
279 B
Go
Raw Normal View History

package handlers
import (
"net/http"
"time"
"github.com/kyverno/kyverno/pkg/webhookconfig"
)
func Monitor(m *webhookconfig.Monitor, inner http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
m.SetTime(time.Now())
inner(w, r)
}
}