common

package
v0.2201.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package common contains common constants and variables.

Index

Constants

View Source
const (
	CfgLogFmt             = "log.format"
	CfgLogLevel           = "log.level"
	CfgScenarioRegex      = "scenario"
	CfgScenarioRegexShort = "s"
	CfgScenarioSkipRegex  = "skip"

	// ScenarioParamsMask is the form of parameters passed to specific scenario.
	//
	// [1] parameter is scenario name, [2] parameter is a parameter name. This
	// is used when binding and parsing (recursive) parameters with viper.
	ScenarioParamsMask = "%[1]s.%[2]s"
)

Variables

This section is empty.

Functions

func GetDefaultScenarios

func GetDefaultScenarios() []scenario.Scenario

GetDefaultScenarios returns all registered default scenarios.

This function *is not* thread-safe.

func GetScenarioNames

func GetScenarioNames() (names []string)

GetScenarioNames returns the names of all scenarios. NOTE: Scenarios are sorted alphabetically.

func GetScenarios

func GetScenarios() map[string]scenario.Scenario

GetScenarios returns all registered scenarios.

This function *is not* thread-safe.

func RegisterScenario

func RegisterScenario(s scenario.Scenario, d bool) error

RegisterScenario adds given scenario to the map of all scenarios and optionally appends it to default scenarios list.

This function *is not* thread-safe.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL