feat(providers): add giganews support (#2479)

This commit is contained in:
Quentin McGaw
2024-09-18 13:01:37 +02:00
committed by GitHub
parent 429aea8e0f
commit 07651683f9
16 changed files with 958 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
package updater
import (
"time"
"github.com/qdm12/gluetun/internal/updater/resolver"
)
func parallelResolverSettings(hosts []string) (settings resolver.ParallelSettings) {
const (
maxFailRatio = 0.1
maxDuration = 5 * time.Second
betweenDuration = time.Second
maxNoNew = 2
maxFails = 2
)
return resolver.ParallelSettings{
Hosts: hosts,
MaxFailRatio: maxFailRatio,
Repeat: resolver.RepeatSettings{
MaxDuration: maxDuration,
BetweenDuration: betweenDuration,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
}