handler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFieldsMap

func BuildFieldsMap(unstr *unstructured.Unstructured, fields []config.Field) map[string]any

func BuildObjectReference

func BuildObjectReference(unstr *unstructured.Unstructured) corev1.ObjectReference

func DisplayObjectReference

func DisplayObjectReference(objectRef corev1.ObjectReference) string

func FindNodeRoles

func FindNodeRoles(obj *unstructured.Unstructured, toVersioned func() (runtime.Object, error)) string

func NodeStatus

func NodeStatus(obj *unstructured.Unstructured, toVersioned func() (runtime.Object, error)) string

func ObjectInDifferentTypes

func ObjectInDifferentTypes(obj any) (runtime.Object, meta.Type, metav1.Object, error)

func ParseJsonPath

func ParseJsonPath(obj any, tmpl string) (string, error)

func PodStatus

func PodStatus(obj *unstructured.Unstructured, toVersioned func() (runtime.Object, error)) string

func PodStatusWithRestartCount

func PodStatusWithRestartCount(obj *unstructured.Unstructured, toVersioned func() (runtime.Object, error)) string

func Ternary

func Ternary[T any](flag bool, trueVal T, falseVal T) T

Types

type BuiltInFunc

type BuiltInFunc func(obj *unstructured.Unstructured, toVersioned func() (runtime.Object, error)) string

type EventHandler

type EventHandler struct {
	GeneralHandler
}

func NewEventHandler

func NewEventHandler(conf config.KubeTrackConfiguration, outputers []output.Output) *EventHandler

func (*EventHandler) OnAdd

func (h *EventHandler) OnAdd(cluster kubecache.Cluster, obj any)

func (*EventHandler) OnDelete

func (h *EventHandler) OnDelete(cluster kubecache.Cluster, obj any)

func (*EventHandler) OnUpdate

func (h *EventHandler) OnUpdate(cluster kubecache.Cluster, oldObj, newObj any)

type GeneralHandler

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

func NewGeneralHandler

func NewGeneralHandler(conf config.KubeTrackConfiguration, outputers []output.Output) *GeneralHandler

func (*GeneralHandler) OnAdd

func (h *GeneralHandler) OnAdd(cluster kubecache.Cluster, obj any)

func (*GeneralHandler) OnDelete

func (h *GeneralHandler) OnDelete(cluster kubecache.Cluster, obj any)

func (*GeneralHandler) OnUpdate

func (h *GeneralHandler) OnUpdate(cluster kubecache.Cluster, oldObj, newObj any)

func (*GeneralHandler) SetSyned

func (h *GeneralHandler) SetSyned(synced bool)

Jump to

Keyboard shortcuts

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