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, options metav1.GetOptions) (*authorizationapi.ClusterPolicyBinding, error)
- func (i *InformerToClusterPolicyBindingLister) LastSyncResourceVersion() string
- func (i *InformerToClusterPolicyBindingLister) List(options metav1.ListOptions) (*authorizationapi.ClusterPolicyBindingList, error)
- type InformerToClusterPolicyLister
- func (i *InformerToClusterPolicyLister) ClusterPolicies() client.ClusterPolicyLister
- func (i *InformerToClusterPolicyLister) Get(name string, options metav1.GetOptions) (*authorizationapi.ClusterPolicy, error)
- func (i *InformerToClusterPolicyLister) LastSyncResourceVersion() string
- func (i *InformerToClusterPolicyLister) List(options metav1.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 StoreToBuildLister
- 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 = "imagestreamref"
)
Variables ¶
This section is empty.
Functions ¶
func ImageStreamReferenceIndexFunc ¶
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 ¶
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) ListCount ¶
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 ¶
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 ¶
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 ¶
type EventQueueStopped struct{}
func (EventQueueStopped) Error ¶
func (es EventQueueStopped) Error() string
type IndexerToClusterResourceQuotaLister ¶
func (*IndexerToClusterResourceQuotaLister) Get ¶
func (i *IndexerToClusterResourceQuotaLister) Get(name string) (*quotaapi.ClusterResourceQuota, error)
func (*IndexerToClusterResourceQuotaLister) List ¶
func (i *IndexerToClusterResourceQuotaLister) List(options metav1.ListOptions) ([]*quotaapi.ClusterResourceQuota, error)
type IndexerToSecurityContextConstraintsLister ¶
IndexerToSecurityContextConstraintsLister gives a store List and Exists methods. The store must contain only SecurityContextConstraints.
func (*IndexerToSecurityContextConstraintsLister) Get ¶
func (s *IndexerToSecurityContextConstraintsLister) Get(name string, options metav1.GetOptions) (*kapi.SecurityContextConstraints, error)
func (*IndexerToSecurityContextConstraintsLister) List ¶
func (s *IndexerToSecurityContextConstraintsLister) List() ([]*kapi.SecurityContextConstraints, error)
List all SecurityContextConstraints in the store.
type InformerToClusterPolicyBindingLister ¶
type InformerToClusterPolicyBindingLister struct {
}func (*InformerToClusterPolicyBindingLister) ClusterPolicyBindings ¶
func (i *InformerToClusterPolicyBindingLister) ClusterPolicyBindings() client.ClusterPolicyBindingLister
func (*InformerToClusterPolicyBindingLister) Get ¶
func (i *InformerToClusterPolicyBindingLister) Get(name string, options metav1.GetOptions) (*authorizationapi.ClusterPolicyBinding, error)
func (*InformerToClusterPolicyBindingLister) LastSyncResourceVersion ¶
func (i *InformerToClusterPolicyBindingLister) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToClusterPolicyBindingLister) List ¶
func (i *InformerToClusterPolicyBindingLister) List(options metav1.ListOptions) (*authorizationapi.ClusterPolicyBindingList, error)
type InformerToClusterPolicyLister ¶
type InformerToClusterPolicyLister struct {
}func (*InformerToClusterPolicyLister) ClusterPolicies ¶
func (i *InformerToClusterPolicyLister) ClusterPolicies() client.ClusterPolicyLister
func (*InformerToClusterPolicyLister) Get ¶
func (i *InformerToClusterPolicyLister) Get(name string, options metav1.GetOptions) (*authorizationapi.ClusterPolicy, error)
func (*InformerToClusterPolicyLister) LastSyncResourceVersion ¶
func (i *InformerToClusterPolicyLister) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToClusterPolicyLister) List ¶
func (i *InformerToClusterPolicyLister) List(options metav1.ListOptions) (*authorizationapi.ClusterPolicyList, error)
type InformerToPolicyBindingNamespacer ¶
type InformerToPolicyBindingNamespacer struct {
}func (*InformerToPolicyBindingNamespacer) LastSyncResourceVersion ¶
func (i *InformerToPolicyBindingNamespacer) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToPolicyBindingNamespacer) PolicyBindings ¶
func (i *InformerToPolicyBindingNamespacer) PolicyBindings(namespace string) client.PolicyBindingLister
type InformerToPolicyNamespacer ¶
type InformerToPolicyNamespacer struct {
}func (*InformerToPolicyNamespacer) LastSyncResourceVersion ¶
func (i *InformerToPolicyNamespacer) LastSyncResourceVersion() string
LastSyncResourceVersion exposes the LastSyncResourceVersion of the internal reflector
func (*InformerToPolicyNamespacer) Policies ¶
func (i *InformerToPolicyNamespacer) Policies(namespace string) client.PolicyLister
type StoreToBuildConfigLister ¶
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 ¶
StoreToBuildConfigListerImpl implements a StoreToBuildConfigLister
func (*StoreToBuildConfigListerImpl) BuildConfigs ¶
func (s *StoreToBuildConfigListerImpl) BuildConfigs(namespace string) storeBuildConfigsNamespacer
func (*StoreToBuildConfigListerImpl) GetConfigsForImageStreamTrigger ¶
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 ¶
func (s *StoreToBuildConfigListerImpl) List() ([]*buildapi.BuildConfig, error)
List all buildconfigs in the store.
type StoreToBuildLister ¶
StoreToBuildLister gives a store a List method. The store must contain only builds.
func (*StoreToBuildLister) Builds ¶
func (s *StoreToBuildLister) Builds(namespace string) storeBuildsNamespacer
type StoreToDeploymentConfigLister ¶
StoreToDeploymentConfigLister gives a store List and Exists methods. The store must contain only deploymentconfigs.
func (*StoreToDeploymentConfigLister) DeploymentConfigs ¶
func (s *StoreToDeploymentConfigLister) DeploymentConfigs(namespace string) storeDeploymentConfigsNamespacer
func (*StoreToDeploymentConfigLister) GetConfigForController ¶
func (s *StoreToDeploymentConfigLister) GetConfigForController(rc *kapi.ReplicationController) (*deployapi.DeploymentConfig, error)
GetConfigForController returns the managing deployment config for the provided replication controller.
func (*StoreToDeploymentConfigLister) GetConfigForPod ¶
func (s *StoreToDeploymentConfigLister) GetConfigForPod(pod *kapi.Pod) (*deployapi.DeploymentConfig, error)
GetConfigForPod returns the managing deployment config for the provided pod.
func (*StoreToDeploymentConfigLister) GetConfigsForImageStream ¶
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 ¶
func (s *StoreToDeploymentConfigLister) List() ([]*deployapi.DeploymentConfig, error)
List all deploymentconfigs in the store.
type StoreToImageStreamLister ¶
StoreToImageStreamLister gives a store List and Exists methods. The store must contain only image streams.
func (*StoreToImageStreamLister) GetStreamsForConfig ¶
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 ¶
func (s *StoreToImageStreamLister) ImageStreams(namespace string) storeImageStreamsNamespacer
func (*StoreToImageStreamLister) List ¶
func (s *StoreToImageStreamLister) List() ([]*imageapi.ImageStream, error)
List all image streams in the store.
type StoreToServiceAccountLister ¶
StoreToServiceAccountLister gives a store List and Exists methods. The store must contain only ServiceAccounts.
func (*StoreToServiceAccountLister) ServiceAccounts ¶
func (s *StoreToServiceAccountLister) ServiceAccounts(namespace string) storeServiceAccountsNamespacer