Documentation
¶
Index ¶
- type EventQueue
- func (eq *EventQueue) Add(obj interface{}) error
- func (eq *EventQueue) Cancel()
- func (eq *EventQueue) ContainedIDs() sets.String
- func (eq *EventQueue) Delete(obj interface{}) error
- func (eq *EventQueue) Get(obj interface{}) (item interface{}, exists bool, err error)
- func (eq *EventQueue) GetByKey(key string) (item interface{}, exists bool, err error)
- func (eq *EventQueue) List() []interface{}
- func (eq *EventQueue) ListConsumed() bool
- func (eq *EventQueue) ListKeys() []string
- func (eq *EventQueue) Pop() (watch.EventType, interface{}, error)
- func (eq *EventQueue) Replace(objects []interface{}, resourceVersion string) error
- func (eq *EventQueue) Update(obj interface{}) error
- type EventQueueStopped
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventQueue ¶
type EventQueue struct {
// contains filtered or unexported fields
}
func NewEventQueue ¶
func NewEventQueue(keyFn kcache.KeyFunc) *EventQueue
NewEventQueue returns a new EventQueue.
func NewEventQueueForStore ¶
func NewEventQueueForStore(keyFn kcache.KeyFunc, store kcache.Store) *EventQueue
NewEventQueueForStore returns a new EventQueue that uses the provided store.
func (*EventQueue) Add ¶
func (eq *EventQueue) Add(obj interface{}) error
Add enqueues a watch.Added event for the given state.
func (*EventQueue) Cancel ¶
func (eq *EventQueue) Cancel()
Cancel function to force Pop function to unblock
func (*EventQueue) ContainedIDs ¶
func (eq *EventQueue) ContainedIDs() sets.String
ContainedIDs returns a sets.String containing all IDs of the enqueued items. This is a snapshot of a moment in time, and one should keep in mind that other go routines can add or remove items after you call this.
func (*EventQueue) Delete ¶
func (eq *EventQueue) Delete(obj interface{}) error
Delete enqueues a watch.Delete event for the given object.
func (*EventQueue) Get ¶
func (eq *EventQueue) Get(obj interface{}) (item interface{}, exists bool, err error)
Get returns the requested item, or sets exists=false.
func (*EventQueue) GetByKey ¶
func (eq *EventQueue) GetByKey(key string) (item interface{}, exists bool, err error)
GetByKey returns the requested item, or sets exists=false.
func (*EventQueue) List ¶
func (eq *EventQueue) List() []interface{}
List returns a list of all enqueued items.
func (*EventQueue) ListConsumed ¶
func (eq *EventQueue) ListConsumed() bool
ListConsumed indicates whether the items queued by a List/Relist operation have been consumed.
func (*EventQueue) ListKeys ¶
func (eq *EventQueue) ListKeys() []string
ListKeys returns all enqueued keys.
func (*EventQueue) Pop ¶
func (eq *EventQueue) Pop() (watch.EventType, interface{}, error)
Pop gets the event and object at the head of the queue. If the event is a delete event, Pop deletes the key from the underlying cache.
func (*EventQueue) Replace ¶
func (eq *EventQueue) Replace(objects []interface{}, resourceVersion string) error
Replace initializes 'eq' with the state contained in the given map and populates the queue with a watch.Modified event for each of the replaced objects. The backing store takes ownership of keyToObjs; you should not reference the map again after calling this function.
func (*EventQueue) Update ¶
func (eq *EventQueue) Update(obj interface{}) error
Update enqueues a watch.Modified event for the given state.
type EventQueueStopped ¶
type EventQueueStopped struct{}
func (EventQueueStopped) Error ¶
func (es EventQueueStopped) Error() string