Exemplo n.º 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,
	}
}
Exemplo n.º 2
0
func NewModMock(params params.ModuleParams) *ModMock {
	return &ModMock{
		optional1: params.GetStringOrDefault("optional1", ""),
		optional2: params.GetStringOrDefault("optional2", ""),
	}
}
Exemplo n.º 3
0
func NewDocker(params params.ModuleParams) *ModDocker {
	return &ModDocker{
		socket: params.GetStringOrDefault("socket", "unix:///var/run/docker.sock"),
	}
}