kclient

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Client

type Client[T controllers.Object] interface {
	Reader[T]
	Writer[T]
	Informer[T]
}

func NewFiltered

func NewFiltered[T controllers.ComparableObject](c kube.Client, filter Filter) Client[T]

type Filter

type Filter = kubetypes.Filter

type Informer

type Informer[T controllers.Object] interface {
	Reader[T]
	ListUnfiltered(namespace string, selector klabels.Selector) []T
	Start(stop <-chan struct{})
	ShutdownHandlers()
	ShutdownHandler(registration cache.ResourceEventHandlerRegistration)
	HasSyncedIgnoringHandlers() bool
	AddEventHandler(h cache.ResourceEventHandler) cache.ResourceEventHandlerRegistration
	Index(name string, extract func(o T) []string) RawIndexer
}

type RawIndexer

type RawIndexer interface {
	Lookup(key string) []any
}

type ReadWriter

type ReadWriter[T controllers.Object] interface {
	Reader[T]
	Writer[T]
}

type Reader

type Reader[T controllers.Object] interface {
	Get(name, namespace string) T
	List(namespace string, selector klabels.Selector) []T
}

type Untyped

type Untyped = Informer[controllers.Object]

type Writer

type Writer[T controllers.Object] interface {
	Create(object T) (T, error)
	Update(object T) (T, error)
	UpdateStatus(object T) (T, error)
	Patch(name, namespace string, pt apitypes.PatchType, data []byte) (T, error)
	PatchStatus(name, namespace string, pt apitypes.PatchType, data []byte) (T, error)
	ApplyStatus(name, namespace string, pt apitypes.PatchType, data []byte, fieldManager string) (T, error)
	Delete(name, namespace string) error
}

Jump to

Keyboard shortcuts

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