Documentation ¶
Index ¶
- Constants
- func AddIPsToFiles(IPs []string, c Config) error
- func Run(c *Config) error
- type Config
- func (c *Config) AddExtraVar(key string, value interface{})
- func (c *Config) AddToPersistentCommand(cmd *cobra.Command)
- func (c *Config) AddToViper(v *viper.Viper)
- func (c *Config) CopyRootDirectory(directory string) error
- func (c *Config) SetOutputs(stdout, stderr *os.File)
- func (c *Config) SetStderr(stderr *os.File)
- func (c *Config) SetStdout(stdout *os.File)
Constants ¶
View Source
const ( // KeyExecUUID corresponding value in the map is the Execution UUID of the // current benchmark. KeyExecUUID = "arewefastyet_exec_uuid" // KeyExecutionWorkload corresponding value in the map is the workload we will execute. KeyExecutionWorkload = "arewefastyet_execution_workload" // KeyBenchmarkConfigPath corresponding value in the map is the path to the configuration // file that will be used to execute the benchmark by arewefastyet inside the benchmarking // server. KeyBenchmarkConfigPath = "arewefastyet_configuration_file_path" // KeyBenchmarkSecretsPath corresponding value in the map is the path to the secrets // file that will be used to execute the benchmark by arewefastyet inside the benchmarking // server. KeyBenchmarkSecretsPath = "arewefastyet_secrets_file_path" // KeyLastIsSame is set to true if the previous execution has the same config as the current one. KeyLastIsSame = "arewefastyet_last_exec_is_same" // KeyNextIsSame is set to true if the next execution has the same config as the current one. KeyNextIsSame = "arewefastyet_next_exec_is_same" // KeyVitessSchema is the path to the Vitess VSchema that will be used for this benchmark. KeyVitessSchema = "vitess_vschema_path" // KeyVitessVersion corresponding value in the map is the git reference of SHA // which benchmarks will be executed. KeyVitessVersion = "vitess_git_version" // KeyVitessVersionFetchPR corresponding value in the map is the git reference // that is used to fetch a Pull Request. KeyVitessVersionFetchPR = "vitess_git_version_fetch_pr" // KeyVitessVersionPRNumber corresponding value in the map is the Pull Request // number that the execution will benchmark. KeyVitessVersionPRNumber = "vitess_git_version_pr_nb" // KeyVitessMajorVersion corresponding value in the map is an int set to the major // release increment of Vitess. KeyVitessMajorVersion = "vitess_major_version" // KeyVtgatePlanner corresponding value in the map is the query planner version // that will be used to execute the benchmark. KeyVtgatePlanner = "vitess_planner_version" // KeyProfileBinary sets which binary we want to profile (vtgate or vttablet) KeyProfileBinary = "vitess_profile_binary" // KeyProfileMode sets which mode of pprof we want to use. KeyProfileMode = "vitess_profile_mode" // KeyExtraFlagsVTGate represents the list of VTGate flag that will be passed down // to VTGate during startup. The flags are represented as follows in the string: // "--flag1 --flag2" KeyExtraFlagsVTGate = "extra_vtgate_flags" // KeyExtraFlagsVTTablet represents the list of VTTablet flag that will be passed down // to VTTablet during startup. The flags are represented as follows in the string: // "--flag1 --flag2" KeyExtraFlagsVTTablet = "extra_vttablet_flags" // KeyGoVersion corresponding value in the map is the golang version to use for // the execution of the benchmark. KeyGoVersion = "golang_gover" // KeyStatsDBHost corresponding value in the map is the hostname for the stats // database. KeyStatsDBHost = "stats_remote_db_host" // KeyStatsDBName corresponding value in the map is the database name of the stats // database. KeyStatsDBName = "stats_remote_db_database" // KeyStatsDBPort corresponding value in the map is the port used to connect to the // stats database. KeyStatsDBPort = "stats_remote_db_port" // KeyStatsDBUser corresponding value in the map is the user that will be connected // to the stats database. KeyStatsDBUser = "stats_remote_db_user" // KeyStatsDBPassword corresponding value in the map is the password used to login the // user to the stats database. KeyStatsDBPassword = "stats_remote_db_password" )
This list of constants are the key used to name the variables that are given to the Ansible runtime by the Executor. These keys are associated with a value that will be used by Ansible to run the roles and tasks. When executing Ansible, those variables are passed using the `--extra-vars` Ansible flag. These keys and their values are meant to be stored in Config.ExtraVars.
View Source
const (
ErrorPathUnknown = "path does not exist"
)
Variables ¶
This section is empty.
Functions ¶
func AddIPsToFiles ¶
Types ¶
type Config ¶
type Config struct { RootDir string InventoryFile string PlaybookFile string // ExtraVars is a key value map that will be passed to Ansible // as extra variable using --extra-vars. // The corresponding keys are defined as constants in the `vars.go` file of this package. // This map gets filled by the Executor before the execution of Ansible. // It contains all the required information to run the Ansible roles and tasks properly. ExtraVars map[string]interface{} // contains filtered or unexported fields }
func (*Config) AddExtraVar ¶
func (*Config) AddToPersistentCommand ¶
func (*Config) AddToViper ¶
func (*Config) CopyRootDirectory ¶
func (*Config) SetOutputs ¶
Click to show internal directories.
Click to hide internal directories.