Documentation ¶
Index ¶
- Variables
- func ClearCounter()
- func CloseCounter()
- func GetAlarmLogChan() chan<- *protocol.LogGroup
- func GetContainerLogChan() chan<- *protocol.LogGroup
- func GetCounterChan() chan<- *protocol.LogGroup
- func InitCounter()
- func RegisterLogValidatorCreator(name string, creator LogValidatorCreator)
- func RegisterSystemValidatorCreator(name string, creator SystemValidatorCreator)
- func RegisterTagValidatorCreator(name string, creator TagValidatorCreator)
- type LogValidator
- type LogValidatorCreator
- type Report
- type SystemValidator
- type SystemValidatorCreator
- type TagValidator
- type TagValidatorCreator
Constants ¶
This section is empty.
Variables ¶
var ( RawLogCounter int ProcessedLogCounter int FlushLogCounter int FlushLogGroupCounter int )
AlarmLogs spec: map[project_{project}:logstore:{logstore}][{alarm_type}][{alarm_message}][{alarm_count}]
Functions ¶
func ClearCounter ¶
func ClearCounter()
func CloseCounter ¶
func CloseCounter()
func GetAlarmLogChan ¶
func GetContainerLogChan ¶
func GetCounterChan ¶
func InitCounter ¶
func InitCounter()
func RegisterLogValidatorCreator ¶
func RegisterLogValidatorCreator(name string, creator LogValidatorCreator)
RegisterLogValidatorCreator register a new log validator creator to the factory .
func RegisterSystemValidatorCreator ¶
func RegisterSystemValidatorCreator(name string, creator SystemValidatorCreator)
RegisterSystemValidatorCreator register a new system validator creator to the factory.
func RegisterTagValidatorCreator ¶
func RegisterTagValidatorCreator(name string, creator TagValidatorCreator)
RegisterTagValidatorCreator register a new tag validator creator to the factory .
Types ¶
type LogValidator ¶
type LogValidator interface { doc.Doc // Valid the given log group and returns the reports when valid failed. Valid(group *protocol.LogGroup) (reports []*Report) // Name of LogValidator. Name() string }
LogValidator check each loggroup and returns Report slice when having illegal logs.
func NewLogValidator ¶
func NewLogValidator(name string, cfg map[string]interface{}) (LogValidator, error)
NewLogValidator create a new log validator from the factory.
type LogValidatorCreator ¶
type LogValidatorCreator func(spec map[string]interface{}) (LogValidator, error)
type Report ¶
type SystemValidator ¶
type SystemValidator interface { doc.Doc // Start the SystemValidator. Start() error // Valid the given group. Valid(group *protocol.LogGroup) // FetchResult return reports when find failure in the whole testing. FetchResult() (reports []*Report) // Name of SystemValidator Name() string }
SystemValidator verify the total status of the system from the testing start to the end, such as compare logs count.
func NewSystemValidator ¶
func NewSystemValidator(name string, cfg map[string]interface{}) (SystemValidator, error)
NewSystemValidator create a new system validator from the factory.
type SystemValidatorCreator ¶
type SystemValidatorCreator func(spec map[string]interface{}) (SystemValidator, error)
type TagValidator ¶
type TagValidator interface { doc.Doc // Valid the given group and returns the reports when valid failed. Valid(group *protocol.LogGroup) (reports []*Report) // Name of LogValidator. Name() string }
TagValidator check each tag and returns Report slice when having illegal tag.
func NewTagValidators ¶
func NewTagValidators(name string, cfg map[string]interface{}) (TagValidator, error)
NewTagValidators reate a new tag validator from the factory.
type TagValidatorCreator ¶
type TagValidatorCreator func(spec map[string]interface{}) (TagValidator, error)