report

package
v0.0.0-...-229b4da Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleConfigMapEvents

func HandleConfigMapEvents(ctx context.Context, nsWatcher *TypedWatcher[*v1.ConfigMap])

func HandleEventEvents

func HandleEventEvents(ctx context.Context, nsWatcher *TypedWatcher[*v1.Event])

func HandleNamespaceEvents

func HandleNamespaceEvents(ctx context.Context, nsWatcher *TypedWatcher[*v1.Namespace])

func HandlePodEvents

func HandlePodEvents(ctx context.Context, nsWatcher *TypedWatcher[*v1.Pod])

func HandleSecretEvents

func HandleSecretEvents(ctx context.Context, nsWatcher *TypedWatcher[*v1.Secret])

func Run

func Run()

Types

type Kubernetes

type Kubernetes struct {
	ClientSet  *kubernetes.Clientset
	RestConfig *rest.Config
}

func NewKubernetesForContext

func NewKubernetesForContext(context string) (*Kubernetes, error)

func (*Kubernetes) WatchConfigMaps

func (k *Kubernetes) WatchConfigMaps() (*TypedWatcher[*v1.ConfigMap], error)

func (*Kubernetes) WatchEvents

func (k *Kubernetes) WatchEvents() (*TypedWatcher[*v1.Event], error)

func (*Kubernetes) WatchNamespaces

func (k *Kubernetes) WatchNamespaces() (*TypedWatcher[*v1.Namespace], error)

func (*Kubernetes) WatchPods

func (k *Kubernetes) WatchPods() (*TypedWatcher[*v1.Pod], error)

func (*Kubernetes) WatchSecrets

func (k *Kubernetes) WatchSecrets() (*TypedWatcher[*v1.Secret], error)

type TypedEvent

type TypedEvent[A any] struct {
	Type   watch.EventType
	Object A
	Error  interface{}
}

type TypedWatcher

type TypedWatcher[A any] struct {
	Name           string
	WatchInterface watch.Interface
}

func (*TypedWatcher[A]) GetEvents

func (w *TypedWatcher[A]) GetEvents(ctx context.Context) <-chan *TypedEvent[A]

Jump to

Keyboard shortcuts

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