Пример #1
0
func NewHttpLoadbalancer(params params.ModuleParams) *HttpLoadbalancer {
	strategyParsed := sanitizePolicy(params.GetStringOrDefault("strategy", ROUND_ROBIN_STRATEGY))
	urlParsed := mustParseUrl(params.GetString("url"))
	return &HttpLoadbalancer{
		strategy: strategyParsed,
		url:      urlParsed,
	}
}
Пример #2
0
func NewExec(params params.ModuleParams) *Exec {
	return &Exec{
		command: params.GetString("command"),
	}
}
Пример #3
0
func NewBasicAuth(params params.ModuleParams) *BasicAuth {
	return &BasicAuth{
		username: params.GetString("username"),
		password: params.GetString("password"),
	}
}