pages-server/server/gitea/fasthttp.go
2022-05-16 00:43:04 +02:00

16 lines
374 B
Go

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!
}
}