test

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

The test package contains fake informers for testing controllers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeInformer

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
}

FakeInformer provides fake Informer functionality for testing

func (*FakeInformer) Add

func (f *FakeInformer) Add(obj metav1.Object)

Add fakes an Add event for obj

func (*FakeInformer) AddEventHandler

func (f *FakeInformer) AddEventHandler(handler cache.ResourceEventHandler)

AddEventHandler implements the Informer interface.

func (*FakeInformer) AddEventHandlerWithResyncPeriod

func (f *FakeInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration)

func (*FakeInformer) AddIndexers

func (f *FakeInformer) AddIndexers(indexers cache.Indexers) error

func (*FakeInformer) Delete

func (f *FakeInformer) Delete(obj metav1.Object)

Add fakes an Delete event for obj

func (*FakeInformer) GetController

func (f *FakeInformer) GetController() cache.Controller

func (*FakeInformer) GetIndexer

func (f *FakeInformer) GetIndexer() cache.Indexer

func (*FakeInformer) GetStore

func (f *FakeInformer) GetStore() cache.Store

func (*FakeInformer) HasSynced

func (f *FakeInformer) HasSynced() bool

HasSynced implements the Informer interface. Returns f.Synced

func (*FakeInformer) Informer

func (f *FakeInformer) Informer() cache.SharedIndexInformer

func (*FakeInformer) LastSyncResourceVersion

func (f *FakeInformer) LastSyncResourceVersion() string

func (*FakeInformer) Run

func (f *FakeInformer) Run(<-chan struct{})

RunInformersAndControllers implements the Informer interface. Increments f.RunCount

func (*FakeInformer) Update

func (f *FakeInformer) Update(oldObj, newObj metav1.Object)

Add fakes an Update event for obj

Jump to

Keyboard shortcuts

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