Documentation
¶
Overview ¶
Package logs provides a way to parse and get the logs of a pod
Index ¶
- func CheckOptionsForBarmanCommand(logEntries []map[string]interface{}, message, backupName, podName string, ...) (bool, error)
- func CheckRecordForQuery(entry map[string]interface{}, errorTestQuery, user, database, message string) bool
- func HasLogger(logEntries []map[string]interface{}, logger string) bool
- func IsWellFormedLogForLogger(item map[string]interface{}, loggerField string) bool
- func ParseJSONLogs(ctx context.Context, kubeInterface kubernetes.Interface, namespace string, ...) ([]map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckOptionsForBarmanCommand ¶
func CheckOptionsForBarmanCommand( logEntries []map[string]interface{}, message, backupName, podName string, optionsExpected []string, ) (bool, error)
CheckOptionsForBarmanCommand checks if the expected options are used from the barman command execution log
func CheckRecordForQuery ¶
func CheckRecordForQuery(entry map[string]interface{}, errorTestQuery, user, database, message string) bool
CheckRecordForQuery applies some assertions related to the format of the JSON log fields keys and values
func IsWellFormedLogForLogger ¶
IsWellFormedLogForLogger verifies if the message record field of the given map contains the expectedResult string. If the message field matches the expectedResult, then the related record is returned. Otherwise return nil.
func ParseJSONLogs ¶
func ParseJSONLogs( ctx context.Context, kubeInterface kubernetes.Interface, namespace string, podName string, ) ([]map[string]interface{}, error)
ParseJSONLogs returns the pod's logs of a given pod name, in the form of a list of JSON entries
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.