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

26 lines
484 B
Go
Raw Normal View History

package updater
2021-09-23 10:19:30 -07:00
import (
"time"
"github.com/qdm12/gluetun/internal/updater/resolver"
)
func parallelResolverSettings(hosts []string) (settings resolver.ParallelSettings) {
2021-09-23 10:19:30 -07:00
const (
maxFailRatio = 0.1
maxNoNew = 1
maxFails = 2
)
return resolver.ParallelSettings{
Hosts: hosts,
2021-09-23 10:19:30 -07:00
MaxFailRatio: maxFailRatio,
Repeat: resolver.RepeatSettings{
MaxDuration: time.Second,
MaxNoNew: maxNoNew,
MaxFails: maxFails,
SortIPs: true,
},
}
}