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