Documentation ¶
Index ¶
- Constants
- Variables
- func AddAllSharedParameters(cmd *cobra.Command)
- func AddConfigParameter(cmd *cobra.Command)
- func Execute()
- func ReadObjectDefinitions() error
- type JSONParseError
- type JSONValidateError
- type LogFormatError
- type MetricError
- type ObjectDefError
- type OsError
- type ProfilingError
- type SummaryTypeError
Constants ¶
const ( // ExitCodeExecutionError error during execution ExitCodeExecutionError int = 0x80 + iota // ExitCodeJSONParseError error parsing JSON config ExitCodeJSONParseError // ExitCodeJSONValidateError validating JSON config failed ExitCodeJSONValidateError // ExitCodeLogFormatError error resolving log format ExitCodeLogFormatError // ExitCodeObjectDefError error reading object definitions ExitCodeObjectDefError // ExitCodeProfilingError error starting profiling ExitCodeProfilingError // ExitCodeMetricError error starting prometheus ExitCodeMetricError // ExitCodeOsError error when interacting with host OS ExitCodeOsError // ExitCodeSummaryTypeError incorrect summary type ExitCodeSummaryTypeError )
Unfortunately go doesn't support negative exit codes, so same logic as sdkexerciser can't be used (positive for error count and negative for other errors) as exit codes seems to be limited to 8 bits (even though defined as an int), we will use setting the highest bit as a representation of negative values, i.e. errors not corresponding to simulation errors. Exit codes with highest bit set to 0 corresponds to error count from simulation, where 0x7F will represent >127 errors.
const ExitCodeConnectionError = 1
Variables ¶
var RootCmd = &cobra.Command{
Use: "gopherciser",
Short: "User simulation tool",
Long: `Tool to simulate user actions in a sense application`,
}
RootCmd represents the base command when called without any sub-commands
Functions ¶
func AddAllSharedParameters ¶
AddAllSharedParameters add shared parameters to command
func AddConfigParameter ¶
AddConfigParameter add config file parameter to command
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ReadObjectDefinitions ¶
func ReadObjectDefinitions() error
Types ¶
type JSONParseError ¶
type JSONParseError string
JSONParseError error during unmarshal of JSON file
func (JSONParseError) Error ¶
func (err JSONParseError) Error() string
Error implementation of Error interface
type JSONValidateError ¶
type JSONValidateError string
JSONValidateError error during validation of JSON file
func (JSONValidateError) Error ¶
func (err JSONValidateError) Error() string
Error implementation of Error interface
type LogFormatError ¶
type LogFormatError string
LogFormatError error resolving log format
func (LogFormatError) Error ¶
func (err LogFormatError) Error() string
Error implementation of Error interface
type MetricError ¶
type MetricError string
MetricError error starting profiling
func (MetricError) Error ¶
func (err MetricError) Error() string
Error implementation of Error interface
type ObjectDefError ¶
type ObjectDefError string
ObjectDefError error reading object definitions
func (ObjectDefError) Error ¶
func (err ObjectDefError) Error() string
Error implementation of Error interface
type ProfilingError ¶
type ProfilingError string
ProfilingError error starting profiling
func (ProfilingError) Error ¶
func (err ProfilingError) Error() string
Error implementation of Error interface
type SummaryTypeError ¶
type SummaryTypeError string
SummaryTypeError incorrect summary type
func (SummaryTypeError) Error ¶
func (err SummaryTypeError) Error() string
Error incorrect summary type