mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 09:56:55 +00:00
16 lines
279 B
Go
16 lines
279 B
Go
|
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)
|
||
|
}
|
||
|
}
|