Documentation ¶
Index ¶
- func ApplyFilters(event corev1.Event, filters ...EventFilterFunc) bool
- type EventFilterFunc
- type KubernetesDumper
- func (d *KubernetesDumper) DumpDefaultResourcesInAllNamespaces(ctx context.Context, ctxIdentifier string) error
- func (d *KubernetesDumper) DumpDefaultResourcesInNamespace(ctx context.Context, ctxIdentifier string, namespace string) error
- func (d *KubernetesDumper) DumpEventsInNamespace(ctx context.Context, ctxIdentifier string, namespace string, ...) error
- func (d *KubernetesDumper) Logf(msg string, a ...interface{})
- func (d *KubernetesDumper) Logln()
- type Logger
- type LoggerFunc
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 ¶
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.
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)