models

package
v0.0.0-...-c4a3a4a Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT-0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewValidateConfig

func NewValidateConfig(configPath string) (*validatorConfig, error)

func ValidateValidatorConfig

func ValidateValidatorConfig(vConfig validatorConfig) error

Types

type LogValidation

type LogValidation struct {
	LogValue  string `yaml:"log_value"`
	LogLines  int    `yaml:"log_lines"`
	LogStream string `yaml:"log_stream"`
	LogLevel  string `yaml:"log_level"`
	LogSource string `yaml:"log_source"`
}

type MetricDimension

type MetricDimension struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

type MetricValidation

type MetricValidation struct {
	MetricName        string            `yaml:"metric_name"`
	MetricDimension   []MetricDimension `yaml:"metric_dimension"`
	MetricValue       float64           `yaml:"metric_value"`
	MetricSampleCount int               `yaml:"metric_sample_count"`
}

type Statistics

type Statistics string
const (
	MAXIMUM Statistics = "Maximum"
	AVERAGE Statistics = "Average"
)

type ValidateConfig

type ValidateConfig interface {
	GetPluginsConfig() []string
	GetValidateType() string
	GetTestCase() string
	GetDataType() string
	GetNumberMonitoredLogs() int
	GetDataRate() int
	GetCloudWatchAgentConfigPath() string
	GetAgentCollectionPeriod() time.Duration
	GetMetricNamespace() string
	GetMetricValidation() []MetricValidation
	GetLogValidation() []LogValidation
	GetCommitInformation() (string, int64)
	GetUniqueID() string
	GetOSFamily() string
}

type ValidatorFactory

type ValidatorFactory interface {
	// GenerateLoad will send the metrics/logs/traces load to CloudWatchAgent (e.g sending 1000 statsd metrics to CWA to monitor)
	GenerateLoad() error
	// CheckData will get metrics defined by the generator yaml and validate the required metrics
	// (e.g https://github.com/aws/amazon-cloudwatch-agent-test/blob/c5b8bd2da8e71f7ae4db0b66dccffe07dc429fae/test/stress/statsd/parameters.yml#L21-L66)
	CheckData(startTime, endTime time.Time) error

	// Cleanup will clean up all the resources created by the validator.
	Cleanup() error
}

Jump to

Keyboard shortcuts

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