mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 08:57:55 +00:00
next
This commit is contained in:
parent
18a8e777aa
commit
f4d21a6036
3 changed files with 10 additions and 15 deletions
|
@ -113,3 +113,11 @@ func joinURL(baseURL string, paths ...string) string {
|
||||||
|
|
||||||
return baseURL + "/" + strings.Join(p, "/")
|
return baseURL + "/" + strings.Join(p, "/")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getFastHTTPClient() *fasthttp.Client {
|
||||||
|
return &fasthttp.Client{
|
||||||
|
MaxConnDuration: 60 * time.Second,
|
||||||
|
MaxConnWaitTimeout: 1000 * time.Millisecond,
|
||||||
|
MaxConnsPerHost: 128 * 16, // TODO: adjust bottlenecks for best performance with Gitea!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
//go:build fasthttp
|
||||||
|
|
||||||
package gitea
|
package gitea
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package gitea
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/valyala/fasthttp"
|
|
||||||
)
|
|
||||||
|
|
||||||
func getFastHTTPClient() *fasthttp.Client {
|
|
||||||
return &fasthttp.Client{
|
|
||||||
MaxConnDuration: 60 * time.Second,
|
|
||||||
MaxConnWaitTimeout: 1000 * time.Millisecond,
|
|
||||||
MaxConnsPerHost: 128 * 16, // TODO: adjust bottlenecks for best performance with Gitea!
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue