2022-01-20 11:41:25 +00:00
|
|
|
// Copyright 2021 The Gitea Authors. All rights reserved.
|
2022-11-27 18:20:29 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2022-01-20 11:41:25 +00:00
|
|
|
|
|
|
|
package routing
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"sync"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type requestRecord struct {
|
|
|
|
// index of the record in the records map
|
|
|
|
index uint64
|
|
|
|
|
|
|
|
// immutable fields
|
|
|
|
startTime time.Time
|
|
|
|
request *http.Request
|
|
|
|
responseWriter http.ResponseWriter
|
|
|
|
|
|
|
|
// mutex
|
|
|
|
lock sync.RWMutex
|
|
|
|
|
|
|
|
// mutable fields
|
|
|
|
isLongPolling bool
|
|
|
|
funcInfo *FuncInfo
|
2023-07-04 18:36:08 +00:00
|
|
|
panicError any
|
2022-01-20 11:41:25 +00:00
|
|
|
}
|