ErrorType implements runtime.Object but isn't registered in any scheme and should cause errors in tests as a result.
type ErrorType struct{}
func (ErrorType) DeepCopyObject() runtime.Object
DeepCopyObject implements runtime.Object.
func (ErrorType) GetObjectKind() schema.ObjectKind
GetObjectKind implements runtime.Object.
FakeInformer provides fake Informer functionality for testing.
type FakeInformer struct { // Synced is returned by the HasSynced functions to implement the Informer interface Synced bool // RunCount is incremented each time RunInformersAndControllers is called RunCount int // contains filtered or unexported fields }
func (f *FakeInformer) Add(obj metav1.Object)
Add fakes an Add event for obj.
func (f *FakeInformer) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error)
AddEventHandler implements the Informer interface. Adds an EventHandler to the fake Informers. TODO(community): Implement Registration.
func (f *FakeInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration) (cache.ResourceEventHandlerRegistration, error)
AddEventHandlerWithResyncPeriod does nothing. TODO(community): Implement this.
func (f *FakeInformer) AddIndexers(indexers cache.Indexers) error
AddIndexers does nothing. TODO(community): Implement this.
func (f *FakeInformer) Delete(obj metav1.Object)
Delete fakes an Delete event for obj.
func (f *FakeInformer) GetController() cache.Controller
GetController does nothing. TODO(community): Implement this.
func (f *FakeInformer) GetIndexer() cache.Indexer
GetIndexer does nothing. TODO(community): Implement this.
func (f *FakeInformer) GetStore() cache.Store
GetStore does nothing. TODO(community): Implement this.
func (f *FakeInformer) HasSynced() bool
HasSynced implements the Informer interface. Returns f.Synced.
func (f *FakeInformer) Informer() cache.SharedIndexInformer
Informer returns the fake Informer.
func (f *FakeInformer) IsStopped() bool
IsStopped does nothing. TODO(community): Implement this.
func (f *FakeInformer) LastSyncResourceVersion() string
LastSyncResourceVersion does nothing. TODO(community): Implement this.
func (f *FakeInformer) RemoveEventHandler(handle cache.ResourceEventHandlerRegistration) error
RemoveEventHandler does nothing. TODO(community): Implement this.
func (f *FakeInformer) Run(<-chan struct{})
Run implements the Informer interface. Increments f.RunCount.
func (f *FakeInformer) SetTransform(t cache.TransformFunc) error
SetTransform does nothing. TODO(community): Implement this.
func (f *FakeInformer) SetWatchErrorHandler(cache.WatchErrorHandler) error
SetWatchErrorHandler does nothing. TODO(community): Implement this.
func (f *FakeInformer) Update(oldObj, newObj metav1.Object)
Update fakes an Update event for obj.
Queue implements a RateLimiting queue as a non-ratelimited queue for testing. This helps testing by having functions that use a RateLimiting queue synchronously add items to the queue.
type Queue struct { workqueue.Interface AddedRateLimitedLock sync.Mutex AddedRatelimited []any }
func (q *Queue) AddAfter(item interface{}, duration time.Duration)
AddAfter implements RateLimitingInterface.
func (q *Queue) AddRateLimited(item interface{})
AddRateLimited implements RateLimitingInterface. TODO(community): Implement this.
func (q *Queue) Forget(item interface{})
Forget implements RateLimitingInterface. TODO(community): Implement this.
func (q *Queue) NumRequeues(item interface{}) int
NumRequeues implements RateLimitingInterface. TODO(community): Implement this.
UnconventionalListType is used to test CRDs with List types that have a slice of pointers rather than a slice of literals.
type UnconventionalListType struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec string `json:"spec,omitempty"` }
func (u *UnconventionalListType) DeepCopy() *UnconventionalListType
DeepCopy implements *UnconventionalListType Handwritten for simplicity.
func (u *UnconventionalListType) DeepCopyObject() runtime.Object
DeepCopyObject implements runtime.Object Handwritten for simplicity.
UnconventionalListTypeList is used to test CRDs with List types that have a slice of pointers rather than a slice of literals.
type UnconventionalListTypeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []*UnconventionalListType `json:"items"` }
func (u *UnconventionalListTypeList) DeepCopy() *UnconventionalListTypeList
DeepCopy implements *UnconventionalListTypeListt Handwritten for simplicity.
func (u *UnconventionalListTypeList) DeepCopyObject() runtime.Object
DeepCopyObject implements runtime.Object Handwritten for simplicity.