Documentation
¶
Index ¶
Constants ¶
View Source
const (
ConfigurationFileKey = "flags"
)
Variables ¶
This section is empty.
Functions ¶
func LoadEnvironmentFlags ¶
func LoadEnvironmentFlags(configurationFileKey string, e EnvironmentFlags)
LoadEnvironmentFlags loads the environment flags from the configuration file. If the flags field does not exist, it returns an empty map.
Types ¶
type Config ¶
type Config struct {
DesiredFlags string `json:"desiredflags" yaml:"desiredflags" default:""`
}
type EnvironmentFlag ¶
type EnvironmentFlag int
EnvironmentFlag is integer enum for environment flags.
const ( KubernetesUpgradeAllClusters EnvironmentFlag = iota WorkloadUpgradeAllClusters UpdateClusterName GatekeeperAllowedNamespaces UpgradeAllClusters UseExistingRegistries InstallRancher Long Short )
EnvironmentFlag represents a flag that can be set within configuration file. To add a new flag, add it to the enum before environmentFlagLastItem. And run `go generate` in the tests/framework/pkg/environmentflag directory.
func (EnvironmentFlag) String ¶
func (i EnvironmentFlag) String() string
type EnvironmentFlags ¶
type EnvironmentFlags map[EnvironmentFlag]bool
EnvironmentFlags is a map of environment flags. The key is the flag enum and the value is true if the flag is set.
func NewEnvironmentFlags ¶
func NewEnvironmentFlags() EnvironmentFlags
NewEnvironmentFlags creates a new EnvironmentFlags.
func (EnvironmentFlags) GetValue ¶
func (e EnvironmentFlags) GetValue(flag EnvironmentFlag) bool
GetValue returns the value of the flag. If the flag is not set, it returns false.
Click to show internal directories.
Click to hide internal directories.