Logo
Explore Help
Register Sign In
admin/gluetun
1
0
Fork 0
You've already forked gluetun
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
f4db7e3e539677f1862fe8b4c3e77c2fb874df3f
gluetun/internal/params/updater.go

18 lines
412 B
Go
Raw Normal View History

Updater loop with period and http route (#240) * Updater loop with period and http route * Using DNS over TLS to update servers * Better logging * Remove goroutines for cyberghost updater * Respects context for servers update (quite slow overall) * Increase shutdown grace period to 5 seconds * Update announcement * Add log lines for each provider update start
2020-09-12 14:04:54 -04:00
package params
import (
"time"
libparams "github.com/qdm12/golibs/params"
)
// GetUpdaterPeriod obtains the period to fetch the servers information when the tunnel is up.
Add linters and fix lint issues
2020-10-20 02:45:28 +00:00
// Set to 0 to disable.
Updater loop with period and http route (#240) * Updater loop with period and http route * Using DNS over TLS to update servers * Better logging * Remove goroutines for cyberghost updater * Respects context for servers update (quite slow overall) * Increase shutdown grace period to 5 seconds * Update announcement * Add log lines for each provider update start
2020-09-12 14:04:54 -04:00
func (r *reader) GetUpdaterPeriod() (period time.Duration, err error) {
s, err := r.envParams.GetEnv("UPDATER_PERIOD", libparams.Default("0"))
if err != nil {
return 0, err
}
return time.ParseDuration(s)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 68ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API