Documentation
¶
Overview ¶
Package logs provides utilities for retrieving and parsing pod logs in e2e tests
Index ¶
- func FindArchiveBatchCompletions(logEntries []map[string]any) []map[string]any
- func FindArchiveBatches(logEntries []map[string]any) []map[string]any
- func FindLogEntriesByMessage(logEntries []map[string]any, message string) []map[string]any
- func GetPodContainerLogs(ctx context.Context, clientSet *kubernetes.Clientset, ...) ([]map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindArchiveBatchCompletions ¶
FindArchiveBatchCompletions finds "WAL archive batch completed" log entries and returns the parsed data. Each returned map contains the structured log fields.
func FindArchiveBatches ¶
FindArchiveBatches finds "WAL archive batch prepared" log entries and returns the parsed data. Each returned map contains the structured log fields.
func FindLogEntriesByMessage ¶ added in v0.7.0
FindLogEntriesByMessage returns the log entries whose "msg" field equals the given message.
func GetPodContainerLogs ¶
func GetPodContainerLogs( ctx context.Context, clientSet *kubernetes.Clientset, namespace, podName, containerName string, sinceSeconds *int64, ) ([]map[string]any, error)
GetPodContainerLogs retrieves logs from a specific container in a pod and parses them as JSON. All logs are expected to be valid structured JSON. Returns an error if any line is not valid JSON.
Types ¶
This section is empty.