Documentation ¶
Index ¶
- type FakeObjectTracker
- func (t *FakeObjectTracker) Add(obj runtime.Object) error
- func (o *FakeObjectTracker) ClearOptions(message string) error
- func (t *FakeObjectTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error
- func (t *FakeObjectTracker) Delete(gvr schema.GroupVersionResource, ns, name string) error
- func (t *FakeObjectTracker) Get(gvr schema.GroupVersionResource, ns, name string) (runtime.Object, error)
- func (t *FakeObjectTracker) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ns string) (runtime.Object, error)
- func (o *FakeObjectTracker) RunFakeInvocations() error
- func (o *FakeObjectTracker) SetDelay(delay time.Duration) error
- func (o *FakeObjectTracker) SetError(message string) error
- func (t *FakeObjectTracker) Start() error
- func (t *FakeObjectTracker) Stop()
- func (t *FakeObjectTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error
- func (t *FakeObjectTracker) Watch(gvr schema.GroupVersionResource, name string) (watch.Interface, error)
- type FakeObjectTrackers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeObjectTracker ¶
type FakeObjectTracker struct { *watch.FakeWatcher // contains filtered or unexported fields }
FakeObjectTracker implements both k8stesting.ObjectTracker as well as watch.Interface.
func NewCoreClientSet ¶
func NewCoreClientSet(objects ...runtime.Object) (*k8sfake.Clientset, *FakeObjectTracker)
NewCoreClientSet returns a clientset that will respond with the provided objects. It's backed by a very simple object tracker that processes creates, updates and deletions as-is, without applying any validations and/or defaults. It shouldn't be considered a replacement for a real clientset and is mostly useful in simple unit tests.
func NewMachineClientSet ¶
func NewMachineClientSet(objects ...runtime.Object) (*fakeuntyped.Clientset, *FakeObjectTracker)
NewMachineClientSet returns a clientset that will respond with the provided objects. It's backed by a very simple object tracker that processes creates, updates and deletions as-is, without applying any validations and/or defaults. It shouldn't be considered a replacement for a real clientset and is mostly useful in simple unit tests.
func (*FakeObjectTracker) Add ¶
func (t *FakeObjectTracker) Add(obj runtime.Object) error
Add recieves an add event with the object
func (*FakeObjectTracker) ClearOptions ¶
ClearOptions clears any faking options that have been sets
func (*FakeObjectTracker) Create ¶
func (t *FakeObjectTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error
Create recieves an create event with the object
func (*FakeObjectTracker) Delete ¶
func (t *FakeObjectTracker) Delete(gvr schema.GroupVersionResource, ns, name string) error
Delete recieves an delete event with the object
func (*FakeObjectTracker) Get ¶
func (t *FakeObjectTracker) Get(gvr schema.GroupVersionResource, ns, name string) (runtime.Object, error)
Get recieves an get event with the object
func (*FakeObjectTracker) List ¶
func (t *FakeObjectTracker) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ns string) (runtime.Object, error)
List recieves an list event with the object
func (*FakeObjectTracker) RunFakeInvocations ¶
func (o *FakeObjectTracker) RunFakeInvocations() error
RunFakeInvocations runs any custom fake configurations/methods before invoking standard ObjectTrackers
func (*FakeObjectTracker) SetDelay ¶
SetDelay sets delay while invoking any interface exposed by standard ObjectTrackers
func (*FakeObjectTracker) SetError ¶
SetError sets up the errorMessage to be returned on further function calls
func (*FakeObjectTracker) Start ¶
func (t *FakeObjectTracker) Start() error
Start begins tracking of an FakeObjectTracker
func (*FakeObjectTracker) Stop ¶
func (t *FakeObjectTracker) Stop()
Stop terminates tracking of an FakeObjectTracker
func (*FakeObjectTracker) Update ¶
func (t *FakeObjectTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error
Update recieves an update event with the object
func (*FakeObjectTracker) Watch ¶
func (t *FakeObjectTracker) Watch(gvr schema.GroupVersionResource, name string) (watch.Interface, error)
Watch recieves an watch event with the object
type FakeObjectTrackers ¶
type FakeObjectTrackers struct {
ControlMachine, ControlCore, TargetCore *FakeObjectTracker
}
FakeObjectTrackers is a struct containing all the controller fake object trackers
func NewFakeObjectTrackers ¶
func NewFakeObjectTrackers(controlMachine, controlCore, targetCore *FakeObjectTracker) *FakeObjectTrackers
NewFakeObjectTrackers initialize's fakeObjectTrackers initializes the fake object trackers
func (*FakeObjectTrackers) Start ¶
func (o *FakeObjectTrackers) Start() error
Start starts all object trackers as go routines
func (*FakeObjectTrackers) Stop ¶
func (o *FakeObjectTrackers) Stop() error
Stop stops all object trackers