Documentation ¶
Index ¶
- Constants
- func ImageStreamReferenceIndexFunc(obj interface{}) ([]string, error)
- 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) ListCount() int
- func (eq *EventQueue) ListKeys() []string
- func (eq *EventQueue) ListSuccessfulAtLeastOnce() bool
- func (eq *EventQueue) Pop() (watch.EventType, interface{}, error)
- func (eq *EventQueue) Replace(objects []interface{}, resourceVersion string) error
- func (eq *EventQueue) Resync() error
- func (eq *EventQueue) Update(obj interface{}) error
- type EventQueueStopped
- type IndexerToClusterResourceQuotaLister
- type IndexerToSecurityContextConstraintsLister
- type InformerToClusterPolicyBindingLister
- func (i *InformerToClusterPolicyBindingLister) ClusterPolicyBindings() client.ClusterPolicyBindingLister
- func (i *InformerToClusterPolicyBindingLister) Get(name string) (*authorizationapi.ClusterPolicyBinding, error)
- func (i *InformerToClusterPolicyBindingLister) LastSyncResourceVersion() string
- func (i *InformerToClusterPolicyBindingLister) List(options kapi.ListOptions) (*authorizationapi.ClusterPolicyBindingList, error)
- type InformerToClusterPolicyLister
- func (i *InformerToClusterPolicyLister) ClusterPolicies() client.ClusterPolicyLister
- func (i *InformerToClusterPolicyLister) Get(name string) (*authorizationapi.ClusterPolicy, error)
- func (i *InformerToClusterPolicyLister) LastSyncResourceVersion() string
- func (i *InformerToClusterPolicyLister) List(options kapi.ListOptions) (*authorizationapi.ClusterPolicyList, error)
- type InformerToPolicyBindingNamespacer
- type InformerToPolicyNamespacer
- type StoreToBuildConfigLister
- type StoreToBuildConfigListerImpl
- func (s *StoreToBuildConfigListerImpl) BuildConfigs(namespace string) storeBuildConfigsNamespacer
- func (s *StoreToBuildConfigListerImpl) GetConfigsForImageStreamTrigger(namespace, name string) ([]*buildapi.BuildConfig, error)
- func (s *StoreToBuildConfigListerImpl) List() ([]*buildapi.BuildConfig, error)
- type StoreToDeploymentConfigLister
- func (s *StoreToDeploymentConfigLister) DeploymentConfigs(namespace string) storeDeploymentConfigsNamespacer
- func (s *StoreToDeploymentConfigLister) GetConfigForController(rc *kapi.ReplicationController) (*deployapi.DeploymentConfig, error)
- func (s *StoreToDeploymentConfigLister) GetConfigForPod(pod *kapi.Pod) (*deployapi.DeploymentConfig, error)
- func (s *StoreToDeploymentConfigLister) GetConfigsForImageStream(stream *imageapi.ImageStream) ([]*deployapi.DeploymentConfig, error)
- func (s *StoreToDeploymentConfigLister) List() ([]*deployapi.DeploymentConfig, error)
- type StoreToImageStreamLister
- type StoreToServiceAccountLister
Constants ¶
const (
ImageStreamReferenceIndex string = "imagestreamref"
)
Variables ¶
This section is empty.
Functions ¶
func ImageStreamReferenceIndexFunc ¶ added in v1.3.0
ImageStreamReferenceIndexFunc is a default index function that indexes based on image stream references.
Types ¶
type EventQueue ¶
type EventQueue struct {
// contains filtered or unexported fields
}
EventQueue is a Store implementation that provides a sequence of compressed events to a consumer along with event types. This differs from the FIFO implementation in that FIFO does not provide events when an object is deleted and does not provide the type of event. Events are compressed in a manner similar to FIFO, but accounting for event types and deletions. The exact compression semantics are as follows:
- If a watch.Added is enqueued with state X and a watch.Modified with state Y is received, these are compressed into (Added, Y)
- If a watch.Added is enqueued with state X and a watch.Deleted is received, these are compressed and the item is removed from the queue
- If a watch.Modified is enqueued with state X and a watch.Modified with state Y is received, these two events are compressed into (Modified, Y)
- If a watch.Modified is enqueued with state X and a watch.Deleted is received, these are compressed into (Deleted, X)
It should be noted that the scenario where an object is deleted and re-added is not handled by this type nor is it in scope; the reflector uses UIDs for the IDs passed to stores, so you will never see a delete and a re-add for the same ID.
This type maintains a backing store in order to provide the deleted state on watch.Deleted events. This is necessary because the Store API does not receive the deleted state on a watch.Deleted event (though this state is delivered by the watch API itself, it is not passed on to the reflector Store).
func NewEventQueue ¶
func NewEventQueue(keyFn kcache.KeyFunc) *EventQueue
NewEventQueue returns a new EventQueue.
func NewEventQueueForStore ¶ added in v1.0.6
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 ¶ added in v1.0.6
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 ¶ added in v1.3.0
func (eq *EventQueue) ListConsumed() bool
ListConsumed indicates whether the items queued by a List/Relist operation have been consumed.
func (*EventQueue) ListCount ¶ added in v1.5.0
func (eq *EventQueue) ListCount() int
ListCount returns how many objects were queued by the most recent List operation.
func (*EventQueue) ListKeys ¶
func (eq *EventQueue) ListKeys() []string
ListKeys returns all enqueued keys.
func (*EventQueue) ListSuccessfulAtLeastOnce ¶ added in v1.5.0
func (eq *EventQueue) ListSuccessfulAtLeastOnce() bool
ListSuccessfulAtLeastOnce indicates whether a List operation was successfully completed regardless of whether any items were queued.
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) Resync ¶ added in v1.3.0
func (eq *EventQueue) Resync() error
Resync will touch all objects to put them into the processing queue
func (*EventQueue) Update ¶
func (eq *EventQueue) Update(obj interface{}) error
Update enqueues a watch.Modified event for the given state.
type EventQueueStopped ¶ added in v1.0.6
type EventQueueStopped struct{}
func (EventQueueStopped) Error ¶ added in v1.0.6
func (es EventQueueStopped) Error() string
type IndexerToClusterResourceQuotaLister ¶ added in v1.3.0
func (*IndexerToClusterResourceQuotaLister) Get ¶ added in v1.3.0
func (i *IndexerToClusterResourceQuotaLister) Get(name string) (*quotaapi.ClusterResourceQuota, error)
func (*IndexerToClusterResourceQuotaLister) List ¶ added in v1.3.0
func (i *IndexerToClusterResourceQuotaLister) List(options kapi.ListOptions) ([]*quotaapi.ClusterResourceQuota, error)
type IndexerToSecurityContextConstraintsLister ¶ added in v1.3.0
IndexerToSecurityContextConstraintsLister gives a store List and Exists methods. The store must contain only SecurityContextConstraints.
func (*IndexerToSecurityContextConstraintsLister) Get ¶ added in v1.3.0
func (s *IndexerToSecurityContextConstraintsLister) Get(name string) (*kapi.SecurityContextConstraints, error)
func (*IndexerToSecurityContextConstraintsLister) List ¶ added in v1.3.0
func (s *IndexerToSecurityContextConstraintsLister) List() ([]*kapi.SecurityContextConstraints, error)
List all SecurityContextConstraints in the store.
type InformerToClusterPolicyBindingLister ¶ added in v1.3.0
type InformerToClusterPolicyBindingLister struct {
}func (*InformerToClusterPolicyBindingLister) ClusterPolicyBindings ¶ added in v1.3.0
func (i *InformerToClusterPolicyBindingLister) ClusterPolicyBindings() client.ClusterPolicyBindingLister
func (*InformerToClusterPolicyBindingLister) Get ¶ added in v1.3.0
func (i *InformerToClusterPolicyBindingLister) Get(name string) (*authorizationapi.ClusterPolicyBinding, error)
func (*InformerToClusterPolicyBindingLister) LastSyncResourceVersion ¶ added in v1.3.0
func (i *InformerToClusterPolicyBindingLister) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToClusterPolicyBindingLister) List ¶ added in v1.3.0
func (i *InformerToClusterPolicyBindingLister) List(options kapi.ListOptions) (*authorizationapi.ClusterPolicyBindingList, error)
type InformerToClusterPolicyLister ¶ added in v1.3.0
type InformerToClusterPolicyLister struct {
}func (*InformerToClusterPolicyLister) ClusterPolicies ¶ added in v1.3.0
func (i *InformerToClusterPolicyLister) ClusterPolicies() client.ClusterPolicyLister
func (*InformerToClusterPolicyLister) Get ¶ added in v1.3.0
func (i *InformerToClusterPolicyLister) Get(name string) (*authorizationapi.ClusterPolicy, error)
func (*InformerToClusterPolicyLister) LastSyncResourceVersion ¶ added in v1.3.0
func (i *InformerToClusterPolicyLister) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToClusterPolicyLister) List ¶ added in v1.3.0
func (i *InformerToClusterPolicyLister) List(options kapi.ListOptions) (*authorizationapi.ClusterPolicyList, error)
type InformerToPolicyBindingNamespacer ¶ added in v1.3.0
type InformerToPolicyBindingNamespacer struct {
}func (*InformerToPolicyBindingNamespacer) LastSyncResourceVersion ¶ added in v1.3.0
func (i *InformerToPolicyBindingNamespacer) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToPolicyBindingNamespacer) PolicyBindings ¶ added in v1.3.0
func (i *InformerToPolicyBindingNamespacer) PolicyBindings(namespace string) client.PolicyBindingLister
type InformerToPolicyNamespacer ¶ added in v1.3.0
type InformerToPolicyNamespacer struct {
}func (*InformerToPolicyNamespacer) LastSyncResourceVersion ¶ added in v1.3.0
func (i *InformerToPolicyNamespacer) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToPolicyNamespacer) Policies ¶ added in v1.3.0
func (i *InformerToPolicyNamespacer) Policies(namespace string) client.PolicyLister
type StoreToBuildConfigLister ¶ added in v1.4.0
type StoreToBuildConfigLister interface { List() ([]*buildapi.BuildConfig, error) GetConfigsForImageStreamTrigger(namespace, name string) ([]*buildapi.BuildConfig, error) }
StoreToBuildConfigLister gives a store List and Exists methods. The store must contain only buildconfigs.
type StoreToBuildConfigListerImpl ¶ added in v1.4.0
StoreToBuildConfigListerImpl implements a StoreToBuildConfigLister
func (*StoreToBuildConfigListerImpl) BuildConfigs ¶ added in v1.4.0
func (s *StoreToBuildConfigListerImpl) BuildConfigs(namespace string) storeBuildConfigsNamespacer
func (*StoreToBuildConfigListerImpl) GetConfigsForImageStreamTrigger ¶ added in v1.4.0
func (s *StoreToBuildConfigListerImpl) GetConfigsForImageStreamTrigger(namespace, name string) ([]*buildapi.BuildConfig, error)
GetConfigsForImageStream returns all the build configs that are triggered by the provided image stream by searching through using the ImageStreamReferenceIndex (build configs are indexed in the cache by image stream references).
func (*StoreToBuildConfigListerImpl) List ¶ added in v1.4.0
func (s *StoreToBuildConfigListerImpl) List() ([]*buildapi.BuildConfig, error)
List all buildconfigs in the store.
type StoreToDeploymentConfigLister ¶ added in v1.3.0
StoreToDeploymentConfigLister gives a store List and Exists methods. The store must contain only deploymentconfigs.
func (*StoreToDeploymentConfigLister) DeploymentConfigs ¶ added in v1.3.0
func (s *StoreToDeploymentConfigLister) DeploymentConfigs(namespace string) storeDeploymentConfigsNamespacer
func (*StoreToDeploymentConfigLister) GetConfigForController ¶ added in v1.3.0
func (s *StoreToDeploymentConfigLister) GetConfigForController(rc *kapi.ReplicationController) (*deployapi.DeploymentConfig, error)
GetConfigForController returns the managing deployment config for the provided replication controller.
func (*StoreToDeploymentConfigLister) GetConfigForPod ¶ added in v1.3.0
func (s *StoreToDeploymentConfigLister) GetConfigForPod(pod *kapi.Pod) (*deployapi.DeploymentConfig, error)
GetConfigForPod returns the managing deployment config for the provided pod.
func (*StoreToDeploymentConfigLister) GetConfigsForImageStream ¶ added in v1.3.0
func (s *StoreToDeploymentConfigLister) GetConfigsForImageStream(stream *imageapi.ImageStream) ([]*deployapi.DeploymentConfig, error)
GetConfigsForImageStream returns all the deployment configs that point to the provided image stream by searching through using the ImageStreamReferenceIndex (deployment configs are indexed in the cache by namespace and by image stream references).
func (*StoreToDeploymentConfigLister) List ¶ added in v1.3.0
func (s *StoreToDeploymentConfigLister) List() ([]*deployapi.DeploymentConfig, error)
List all deploymentconfigs in the store.
type StoreToImageStreamLister ¶ added in v1.3.0
StoreToImageStreamLister gives a store List and Exists methods. The store must contain only image streams.
func (*StoreToImageStreamLister) GetStreamsForConfig ¶ added in v1.3.0
func (s *StoreToImageStreamLister) GetStreamsForConfig(config *deployapi.DeploymentConfig) []*imageapi.ImageStream
GetStreamsForConfig returns all the image streams that the provided deployment config points to.
func (*StoreToImageStreamLister) ImageStreams ¶ added in v1.3.0
func (s *StoreToImageStreamLister) ImageStreams(namespace string) storeImageStreamsNamespacer
func (*StoreToImageStreamLister) List ¶ added in v1.3.0
func (s *StoreToImageStreamLister) List() ([]*imageapi.ImageStream, error)
List all image streams in the store.
type StoreToServiceAccountLister ¶ added in v1.4.0
StoreToServiceAccountLister gives a store List and Exists methods. The store must contain only ServiceAccounts.
func (*StoreToServiceAccountLister) ServiceAccounts ¶ added in v1.4.0
func (s *StoreToServiceAccountLister) ServiceAccounts(namespace string) storeServiceAccountsNamespacer