mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
perf: query data AS OF SYSTEM TIME
(#5231)
Queries the data in the storage layser at the timestamp when the call hit the API layer
This commit is contained in:
13
internal/api/http/middleware/call_interceptor.go
Normal file
13
internal/api/http/middleware/call_interceptor.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/call"
|
||||
)
|
||||
|
||||
func CallDurationHandler(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
next.ServeHTTP(w, r.WithContext(call.WithTimestamp(r.Context())))
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user