Documentation ¶
Index ¶
- Constants
- func ClusterAndNamespaceIndexFunc(obj interface{}) ([]string, error)
- func ClusterAndNamespaceIndexKey(clusterName logicalcluster.Name, namespace string) string
- func ClusterIndexFunc(obj interface{}) ([]string, error)
- func ClusterIndexKey(clusterName logicalcluster.Name) string
- func DeletionHandlingMetaClusterNamespaceKeyFunc(obj interface{}) (string, error)
- func ListAllByCluster(indexer cache.Indexer, clusterName logicalcluster.Name, ...) error
- func ListAllByClusterAndNamespace(indexer cache.Indexer, clusterName logicalcluster.Name, namespace string, ...) error
- func MetaClusterNamespaceKeyFunc(obj interface{}) (string, error)
- func SplitMetaClusterNamespaceKey(key string) (clusterName logicalcluster.Name, namespace, name string, err error)
- func ToClusterAwareKey(cluster, namespace, name string) string
- type ClusterLister
- type GenericClusterLister
- type ScopeableSharedIndexInformer
Constants ¶
const ( // ClusterIndexName is the name of the index that allows you to filter by cluster. ClusterIndexName = "cluster" // ClusterAndNamespaceIndexName is the name of index that allows you to filter by cluster and namespace. ClusterAndNamespaceIndexName = "cluster-and-namespace" )
Variables ¶
This section is empty.
Functions ¶
func ClusterAndNamespaceIndexFunc ¶
ClusterAndNamespaceIndexFunc indexes by cluster and namespace name.
func ClusterAndNamespaceIndexKey ¶
ClusterAndNamespaceIndexKey formats the index key for a cluster name and namespace.
func ClusterIndexFunc ¶
ClusterIndexFunc indexes by cluster name.
func ClusterIndexKey ¶
func ClusterIndexKey(clusterName logicalcluster.Name) string
ClusterIndexKey formats the index key for a cluster name.
func DeletionHandlingMetaClusterNamespaceKeyFunc ¶
DeletionHandlingMetaClusterNamespaceKeyFunc checks for DeletedFinalStateUnknown objects before calling MetaClusterNamespaceKeyFunc.
func ListAllByCluster ¶
func ListAllByCluster(indexer cache.Indexer, clusterName logicalcluster.Name, selector labels.Selector, appendFn cache.AppendFunc) error
ListAllByCluster used to list items belongs to a cluster from Indexer.
func ListAllByClusterAndNamespace ¶
func ListAllByClusterAndNamespace(indexer cache.Indexer, clusterName logicalcluster.Name, namespace string, selector labels.Selector, appendFn cache.AppendFunc) error
ListAllByClusterAndNamespace used to list items belongs to a cluster and namespace from Indexer.
func MetaClusterNamespaceKeyFunc ¶
MetaClusterNamespaceKeyFunc is a convenient default KeyFunc which knows how to make keys for API objects which implement meta.Interface. The key uses the format <clusterName>|<namespace>/<name> unless <namespace> is empty, then it's just <clusterName>|<name>, and if running in a single-cluster context where no explicit cluster name is given, it's just <name>.
func SplitMetaClusterNamespaceKey ¶
func SplitMetaClusterNamespaceKey(key string) (clusterName logicalcluster.Name, namespace, name string, err error)
SplitMetaClusterNamespaceKey returns the namespace and name that MetaClusterNamespaceKeyFunc encoded into key.
func ToClusterAwareKey ¶
ToClusterAwareKey formats a cluster, namespace, and name as a key.
Types ¶
type ClusterLister ¶
type ClusterLister struct {
// contains filtered or unexported fields
}
ClusterLister is a lister that supports multiple logical clusters. It can list the entire contents of the backing store, and return individual cache.GenericListers that are scoped to individual logical clusters.
func NewGenericClusterLister ¶
func NewGenericClusterLister(indexer cache.Indexer, resource schema.GroupResource) *ClusterLister
NewGenericClusterLister creates a new instance for the ClusterLister.
func (*ClusterLister) ByCluster ¶
func (s *ClusterLister) ByCluster(clusterName logicalcluster.Name) cache.GenericLister
type GenericClusterLister ¶
type GenericClusterLister interface { // List will return all objects across logical clusters and all namespaces List(selector labels.Selector) (ret []runtime.Object, err error) // ByCluster will give you a cache.GenericLister for one logical cluster ByCluster(clusterName logicalcluster.Name) cache.GenericLister }
GenericClusterLister is a lister that can either list all objects across all logical clusters, or scope down to a lister for one logical cluster only.
type ScopeableSharedIndexInformer ¶
type ScopeableSharedIndexInformer interface { cache.SharedIndexInformer }
ScopeableSharedIndexInformer is an informer that knows how to scope itself down to one cluster, or act as an informer across clusters.