kotclient

package
v0.0.0-...-8262c23 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsNotFound      = apierrors.IsNotFound
	NewNotFound     = apierrors.NewNotFound
	IgnoreNotFound  = runtimeclient.IgnoreNotFound
	RetryOnConflict = retry.RetryOnConflict
	DefaultRetry    = retry.DefaultRetry
)

Functions

func ExtractList

func ExtractList(list runtimeclient.ObjectList) ([]runtimeclient.Object, error)

func ForegroundDeletion

func ForegroundDeletion() runtimeclient.DeleteOption

func InNamespace

func InNamespace(name string) runtimeclient.InNamespace

func IndexListByUID

func IndexListByUID(list runtimeclient.ObjectList) (map[string]runtimeclient.Object, error)

func LabeledWith

func LabeledWith(name, value string) *runtimeclient.ListOptions

NOTE: This will panic if an invalid label is provided, if you have tests then you'll hopefully catch them early :)

func ObjectField

func ObjectField(obj runtimeclient.Object, field ...string) (interface{}, error)

Inspired by https://stackoverflow.com/a/63022947

func SetList

func SetList(list runtimeclient.ObjectList, objs []runtimeclient.Object) error

func SortByAge

func SortByAge(list runtimeclient.ObjectList) error

func WithLabels

func WithLabels(lbls map[string]string) *runtimeclient.ListOptions

NOTE: This will panic if an invalid label is provided, if you have tests then you'll hopefully catch them early :)

Types

type Client

type Client interface {
	runtimeclient.Client

	Reload(ctx context.Context, resource runtimeclient.Object) error
	UpdateStatus(ctx context.Context, resource runtimeclient.Object) error
	SyncList(ctx context.Context, listBefore, listAfter runtimeclient.ObjectList, processor ListSyncProcessFunc) error
}

func Decorate

func Decorate(cli runtimeclient.Client) Client

type GR

type GR = schema.GroupResource

type GV

type GV = schema.GroupVersion

type GVK

type Key

type Key = types.NamespacedName

type ListSyncProcessFunc

type ListSyncProcessFunc = func(obj runtimeclient.Object) error

type MatchingFields

type MatchingFields = runtimeclient.MatchingFields

Jump to

Keyboard shortcuts

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