mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
wip
This commit is contained in:
parent
4f2c94c7d9
commit
ec7fcca0f5
8 changed files with 96 additions and 128 deletions
16
server/gitea/fasthttp.go
Normal file
16
server/gitea/fasthttp.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package gitea
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
func getFastHTTPClient(timeout time.Duration) *fasthttp.Client {
|
||||
return &fasthttp.Client{
|
||||
ReadTimeout: timeout,
|
||||
MaxConnDuration: 60 * time.Second,
|
||||
MaxConnWaitTimeout: 1000 * time.Millisecond,
|
||||
MaxConnsPerHost: 128 * 16, // TODO: adjust bottlenecks for best performance with Gitea!
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue