testutils

package
v0.0.0-...-ab96290 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	// Error is the error passed to an error log line.
	Error error

	// KeysAndValues are the keys and values that were logged with
	// the log line.
	KeysAndValues []interface{}

	// Level is the level of the info log line.
	Level int

	// Messages is the message from the log line.
	Message string
}

LogEntry captures the information about a particular log line.

type TestLogger

type TestLogger interface {
	Entries() []LogEntry
	Messages() []string
	Logger() logr.Logger
}

TestLogger provides a logr.Logger and access to a list of log entries logged via the logger.

func NewTestLogger

func NewTestLogger() TestLogger

NewTestLogger constructs a new TestLogger.

Jump to

Keyboard shortcuts

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