Documentation ¶
Index ¶
- type Config
- func (cfg *Config) Execute(ctx context.Context, templateData interface{}) error
- func (cfg *Config) SetDebugLogging()
- func (cfg *Config) SetTrafficLogging()
- func (cfg *Config) SetTrafficMetricsLogging()
- func (cfg *Config) TestConnection(ctx context.Context) error
- func (cfg *Config) UnmarshalJSON(arg []byte) error
- func (cfg *Config) Validate() error
- type LogFormatType
- type LogSettings
- type OutputsSettings
- type Settings
- type SummaryActionDataEntry
- type SummaryEntry
- type SummaryHeader
- type SummaryHeaderEntry
- type SummaryRequestDataEntry
- type SummaryType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Scheduler scheduler.IScheduler `json:"scheduler"` // CustomLoggers list of custom loggers. CustomLoggers []*logger.Logger `json:"-"` // contains filtered or unexported fields }
Config setup and scenario to execute
func NewExampleConfig ¶
NewExampleConfig creates an example configuration populated with example data
func (*Config) SetDebugLogging ¶
func (cfg *Config) SetDebugLogging()
SetDebugLogging override function to set debug logging
func (*Config) SetTrafficLogging ¶
func (cfg *Config) SetTrafficLogging()
SetTrafficLogging override function to set traffic logging
func (*Config) SetTrafficMetricsLogging ¶
func (cfg *Config) SetTrafficMetricsLogging()
SetTrafficMetricsLogging override function to set traffic logging
func (*Config) UnmarshalJSON ¶
UnmarshalJSON unmarshal config
type LogFormatType ¶
type LogFormatType int
LogFormatType one of: LogFormatTSVFile, LogFormatTSVConsole,
LogFormatJSONFile, LogFormatJSONConsole, LogFormatColorConsole
const ( // LogFormatTSVFile log to tsv file, and status to console LogFormatTSVFile LogFormatType = iota // LogFormatTSVConsole log tsv to console and no status output LogFormatTSVConsole // LogFormatJSONFile log to json file, and status to console LogFormatJSONFile // LogFormatJSONConsole log json to console and no status output LogFormatJSONConsole // LogFormatColorConsole log to console color formatted and no status output LogFormatColorConsole // LogFormatTSVFileJSONConsole log to console in json format and to file in TSV format LogFormatTSVFileJSONConsole // LogFormatNoLogs turns off all default logging, custom loggers will still be used LogFormatNoLogs // LogFormatOnlyStatus turns off all default logging except status, custom loggers will still be used LogFormatOnlyStatus )
LogFormat enum
func (LogFormatType) GetEnumMap ¶
func (value LogFormatType) GetEnumMap() *enummap.EnumMap
func (LogFormatType) MarshalJSON ¶
func (format LogFormatType) MarshalJSON() ([]byte, error)
MarshalJSON marshal LogFormatType
func (*LogFormatType) UnmarshalJSON ¶
func (format *LogFormatType) UnmarshalJSON(arg []byte) error
UnmarshalJSON unmarshal LogFormatType
type LogSettings ¶
type LogSettings struct { Traffic bool `json:"traffic,omitempty" displayname:"Traffic log" doc-key:"config.settings.logs.traffic"` Debug bool `json:"debug,omitempty" displayname:"Debug log" doc-key:"config.settings.logs.debug"` TrafficMetrics bool `json:"metrics,omitempty" displayname:"Traffic metrics log" doc-key:"config.settings.logs.metrics"` FileName session.SyncedTemplate `json:"filename" displayname:"Log filename" displayelement:"savefile" doc-key:"config.settings.logs.filename"` Format LogFormatType `json:"format,omitempty" displayname:"Log format" doc-key:"config.settings.logs.format"` Summary SummaryType `json:"summary,omitempty" displayname:"Summary type" doc-key:"config.settings.logs.summary"` }
LogSettings settings for logging
type OutputsSettings ¶
type OutputsSettings struct {
Dir string `json:"dir" displayname:"Output directory" doc-key:"config.settings.outputs.dir"`
}
OutputsSettings settings for produced outputs (if any)
type Settings ¶
type Settings struct { Timeout int `json:"timeout" displayname:"WebSocket timeout" doc-key:"config.settings.timeout"` // Timeout in seconds LogSettings LogSettings `json:"logs" doc-key:"config.settings.logs"` OutputsSettings OutputsSettings `json:"outputs,omitempty" doc-key:"config.settings.outputs"` }
Settings Config settings struct
type SummaryActionDataEntry ¶
type SummaryActionDataEntry struct { Action string Label string AppGUID string SuccessRate string AvgResp string Requests string Errs string Warns string Sent string Received string }
SummaryActionDataEntry data entry for action summary table
type SummaryEntry ¶
SummaryEntry title, value and color combo for summary printout
func (*SummaryEntry) Title ¶
func (entry *SummaryEntry) Title(summary SummaryType) string
Title returns long or short form of title depending on summary type
func (*SummaryEntry) ValueString ¶
func (entry *SummaryEntry) ValueString(summary SummaryType) string
ValueString returns value string as ": value" or "<value>" depending on summary type
type SummaryHeader ¶
type SummaryHeader map[string]*SummaryHeaderEntry
type SummaryHeaderEntry ¶
SummaryHeaderEntry is used to calculate summary column sizes
func (*SummaryHeaderEntry) UpdateColSize ¶
func (entry *SummaryHeaderEntry) UpdateColSize(new int)
UpdateColSize for summary header entry
type SummaryRequestDataEntry ¶
type SummaryRequestDataEntry struct { Method string Path string AvgResp string Requests string Sent string Received string }
SummaryRequestDataEntry data entry for request summary table
type SummaryType ¶
type SummaryType int
const ( SummaryTypeDefault SummaryType = iota SummaryTypeNone SummaryTypeSimple SummaryTypeExtended SummaryTypeFull )
SummaryType enum
func (*SummaryType) EntryEnd ¶
func (summary *SummaryType) EntryEnd() string
EntryEnd returns new row or space depending on summary type
func (SummaryType) GetEnumMap ¶
func (value SummaryType) GetEnumMap() *enummap.EnumMap
func (SummaryType) MarshalJSON ¶
func (value SummaryType) MarshalJSON() ([]byte, error)
MarshalJSON marshal LogFormatType
func (*SummaryType) UnmarshalJSON ¶
func (value *SummaryType) UnmarshalJSON(arg []byte) error
UnmarshalJSON unmarshal LogFormatType