Files
gluetun/internal/provider/vpnsecure/updater/resolve.go

27 lines
517 B
Go
Raw Normal View History

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