performance improvement and small fix on loadbalancer

This commit is contained in:
yusing
2024-10-09 18:10:51 +08:00
parent 5c40f4aa84
commit d91b66ae87
11 changed files with 77 additions and 50 deletions

View File

@@ -26,7 +26,7 @@ func NewServer(name string, url types.URL, weight weightType, handler http.Handl
srv := &Server{
Name: name,
URL: url,
Weight: weightType(weight),
Weight: weight,
handler: handler,
pinger: &http.Client{Timeout: 3 * time.Second},
}