dump

package
v0.0.0-...-02c6b06 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilters

func ApplyFilters(event corev1.Event, filters ...EventFilterFunc) bool

ApplyFilters checks if one of the EventFilters filters the current event

Types

type EventFilterFunc

type EventFilterFunc func(event corev1.Event) bool

EventFilterFunc is a function to filter events

type KubernetesDumper

type KubernetesDumper struct {
	// contains filtered or unexported fields
}

KubernetesDumper is helper struct that can print different information from a kubernetes cluster.

func NewKubernetesDumper

func NewKubernetesDumper(log Logger, k8sClient client.Client) *KubernetesDumper

NewKubernetesDumper creates a new default k8s dumper.

func (*KubernetesDumper) DumpDefaultResourcesInAllNamespaces

func (d *KubernetesDumper) DumpDefaultResourcesInAllNamespaces(ctx context.Context, ctxIdentifier string) error

DumpDefaultResourcesInAllNamespaces dumps all default k8s resources of a namespace

func (*KubernetesDumper) DumpDefaultResourcesInNamespace

func (d *KubernetesDumper) DumpDefaultResourcesInNamespace(ctx context.Context, ctxIdentifier string, namespace string) error

DumpDefaultResourcesInNamespace dumps all default K8s resources of a namespace.

func (*KubernetesDumper) DumpEventsInNamespace

func (d *KubernetesDumper) DumpEventsInNamespace(ctx context.Context, ctxIdentifier string, namespace string, filters ...EventFilterFunc) error

DumpEventsInNamespace prints all events of a namespace

func (*KubernetesDumper) Logf

func (d *KubernetesDumper) Logf(msg string, a ...interface{})

Logf logs the messages and formats the message with the given args.

func (*KubernetesDumper) Logln

func (d *KubernetesDumper) Logln()

Logln prints an empty line

type Logger

type Logger interface {
	Log(msg string)
}

Logger is simplified logging interface so that we can use the old logrus logger and the logr.Logger.

type LoggerFunc

type LoggerFunc func(msg string)

LoggerFunc is a logger func that implements the Logger interface.

func (LoggerFunc) Log

func (f LoggerFunc) Log(msg string)

Jump to

Keyboard shortcuts

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