logs

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logs provides utilities for retrieving and parsing pod logs in e2e tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindArchiveBatchCompletions

func FindArchiveBatchCompletions(logEntries []map[string]any) []map[string]any

FindArchiveBatchCompletions finds "WAL archive batch completed" log entries and returns the parsed data. Each returned map contains the structured log fields.

func FindArchiveBatches

func FindArchiveBatches(logEntries []map[string]any) []map[string]any

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

func FindLogEntriesByMessage(logEntries []map[string]any, message string) []map[string]any

FindLogEntriesByMessage returns the log entries whose "msg" field equals the given message.

func FindPgbackrestCommandOptions added in v0.8.0

func FindPgbackrestCommandOptions(logEntries []map[string]any) []string

FindPgbackrestCommandOptions scans the structured log entries for pgbackrest command invocations (which the plugin logs together with an "options" field) and returns each invocation's options joined into a single space-separated string. This makes it easy to assert on the exact flags the plugin passed to pgbackrest.

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.

Jump to

Keyboard shortcuts

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