2020-11-08 20:56:49 -05:00
|
|
|
package params
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/qdm12/gluetun/internal/constants"
|
2020-12-31 21:50:28 +00:00
|
|
|
libparams "github.com/qdm12/golibs/params"
|
2020-11-08 20:56:49 -05:00
|
|
|
)
|
|
|
|
|
|
2020-11-09 23:17:22 +00:00
|
|
|
// GetPrivadoHostnames obtains the hostnames for the Privado server from the
|
2020-12-31 21:50:28 +00:00
|
|
|
// environment variable SERVER_HOSTNAME.
|
2020-11-09 23:17:22 +00:00
|
|
|
func (r *reader) GetPrivadoHostnames() (hosts []string, err error) {
|
2020-12-31 21:50:28 +00:00
|
|
|
return r.envParams.GetCSVInPossibilities("SERVER_HOSTNAME",
|
|
|
|
|
constants.PrivadoHostnameChoices(),
|
|
|
|
|
libparams.RetroKeys([]string{"HOSTNAME"}, r.onRetroActive))
|
2020-11-08 20:56:49 -05:00
|
|
|
}
|