Documentation ¶
Index ¶
- func GetObjectFromChan(c chan runtime.Object) runtime.Object
- func NewCluster(name string, readyStatus api_v1.ConditionStatus) *federation_api.Cluster
- func RegisterFakeCopyOnCreate(resource string, client *core.Fake, watcher *WatcherDispatcher) chan runtime.Object
- func RegisterFakeCopyOnUpdate(resource string, client *core.Fake, watcher *WatcherDispatcher) chan runtime.Object
- func RegisterFakeList(resource string, client *core.Fake, obj runtime.Object)
- func ToFederatedInformerForTestOnly(informer util.FederatedInformer) util.FederatedInformerForTestOnly
- func WaitForStoreUpdate(store util.FederatedReadOnlyStore, clusterName, key string, ...) error
- type WatcherDispatcher
- func (wd *WatcherDispatcher) Action(action watch.EventType, obj runtime.Object)
- func (wd *WatcherDispatcher) Add(obj runtime.Object)
- func (wd *WatcherDispatcher) Delete(lastValue runtime.Object)
- func (wd *WatcherDispatcher) Error(errValue runtime.Object)
- func (wd *WatcherDispatcher) Modify(obj runtime.Object)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjectFromChan ¶
GetObjectFromChan tries to get an api object from the given channel within a reasonable time (1 min).
func NewCluster ¶
func NewCluster(name string, readyStatus api_v1.ConditionStatus) *federation_api.Cluster
NewCluster builds a new cluster object.
func RegisterFakeCopyOnCreate ¶
func RegisterFakeCopyOnCreate(resource string, client *core.Fake, watcher *WatcherDispatcher) chan runtime.Object
RegisterFakeCopyOnCreate registers a reactor in the given fake client that passes all created objects to the given watcher and also copies them to a channel for in-test inspection.
func RegisterFakeCopyOnUpdate ¶
func RegisterFakeCopyOnUpdate(resource string, client *core.Fake, watcher *WatcherDispatcher) chan runtime.Object
RegisterFakeCopyOnCreate registers a reactor in the given fake client that passes all updated objects to the given watcher and also copies them to a channel for in-test inspection.
func RegisterFakeList ¶
RegisterFakeList registers a list response for the specified resource inside the given fake client. The passed value will be returned with every list call.
func ToFederatedInformerForTestOnly ¶
func ToFederatedInformerForTestOnly(informer util.FederatedInformer) util.FederatedInformerForTestOnly
func WaitForStoreUpdate ¶
func WaitForStoreUpdate(store util.FederatedReadOnlyStore, clusterName, key string, timeout time.Duration) error
Ensure a key is in the store before returning (or timeout w/ error)
Types ¶
type WatcherDispatcher ¶
A structure that distributes eventes to multiple watchers.
func RegisterFakeWatch ¶
func RegisterFakeWatch(resource string, client *core.Fake) *WatcherDispatcher
RegisterFakeWatch adds a new fake watcher for the specified resource in the given fake client. All subsequent requests for a watch on the client will result in returning this fake watcher.
func (*WatcherDispatcher) Action ¶
func (wd *WatcherDispatcher) Action(action watch.EventType, obj runtime.Object)
Action sends an event of the requested type, for table-based testing.
func (*WatcherDispatcher) Add ¶
func (wd *WatcherDispatcher) Add(obj runtime.Object)
Add sends an add event.
func (*WatcherDispatcher) Delete ¶
func (wd *WatcherDispatcher) Delete(lastValue runtime.Object)
Delete sends a delete event.
func (*WatcherDispatcher) Error ¶
func (wd *WatcherDispatcher) Error(errValue runtime.Object)
Error sends an Error event.
func (*WatcherDispatcher) Modify ¶
func (wd *WatcherDispatcher) Modify(obj runtime.Object)
Modify sends a modify event.