refactor: routing info middleware (#37653)

fix #37650
This commit is contained in:
wxiaoguang
2026-05-11 22:39:50 +08:00
committed by GitHub
parent 7621b65403
commit 2eb7b3c7da
5 changed files with 87 additions and 95 deletions

View File

@@ -12,20 +12,20 @@ import (
)
type requestRecord struct {
// index of the record in the records map
index uint64
// immutable fields
startTime time.Time
request *http.Request
responseWriter http.ResponseWriter
index uint64 // unique number (per process) for the request
startTime time.Time
request *http.Request
respWriter http.ResponseWriter
// mutex
lock sync.RWMutex
// mutable fields
// below are mutable fields
funcInfo *FuncInfo
// * for "mark as long polling"
isLongPolling bool
logLevel log.Level
funcInfo *FuncInfo
panicError error
// * for router logger
logLevel log.Level
panicError error
}