Documentation ¶
Index ¶
- Variables
- func ExtractList(list runtimeclient.ObjectList) ([]runtimeclient.Object, error)
- func ForegroundDeletion() runtimeclient.DeleteOption
- func InNamespace(name string) runtimeclient.InNamespace
- func IndexListByUID(list runtimeclient.ObjectList) (map[string]runtimeclient.Object, error)
- func LabeledWith(name, value string) *runtimeclient.ListOptions
- func ObjectField(obj runtimeclient.Object, field ...string) (interface{}, error)
- func SetList(list runtimeclient.ObjectList, objs []runtimeclient.Object) error
- func SortByAge(list runtimeclient.ObjectList) error
- func WithLabels(lbls map[string]string) *runtimeclient.ListOptions
- type Client
- type GR
- type GV
- type GVK
- type Key
- type ListSyncProcessFunc
- type MatchingFields
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 GVK = schema.GroupVersionKind
type Key ¶
type Key = types.NamespacedName
type ListSyncProcessFunc ¶
type ListSyncProcessFunc = func(obj runtimeclient.Object) error
type MatchingFields ¶
type MatchingFields = runtimeclient.MatchingFields
Click to show internal directories.
Click to hide internal directories.