indexers

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 12 Imported by: 18

Documentation

Index

Constants

View Source
const (
	// APIExportByIdentity is the indexer name for retrieving APIExports by identity hash.
	APIExportByIdentity = "APIExportByIdentity"
	// APIExportBySecret is the indexer name for retrieving APIExports by
	APIExportBySecret = "APIExportSecret"
)
View Source
const (
	// ByLogicalCluster is the name for the index that indexes by an object's logical cluster.
	ByLogicalCluster = "kcp-global-byLogicalCluster"
	// ByLogicalClusterAndNamespace is the name for the index that indexes by an object's logical cluster and namespace.
	ByLogicalClusterAndNamespace = "kcp-global-byLogicalClusterAndNamespace"
	// BySyncerFinalizerKey is the name for the index that indexes by syncer finalizer label keys.
	BySyncerFinalizerKey = "bySyncerFinalizerKey"
	// APIBindingByClusterAndAcceptedClaimedGroupResources is the name for the index that indexes an APIBinding by its
	// cluster name and accepted claimed group resources.
	APIBindingByClusterAndAcceptedClaimedGroupResources = "byClusterAndAcceptedClaimedGroupResources"
)
View Source
const (
	SyncTargetsBySyncTargetKey = "SyncTargetsBySyncTargetKey"
)

Variables

This section is empty.

Functions

func AddIfNotPresentOrDie added in v0.7.6

func AddIfNotPresentOrDie(indexer cache.Indexer, toAdd cache.Indexers)

AddIfNotPresentOrDie tries to add everything from toAdd to indexer's indexers that does not already exist. It panics if it encounters an error.

func Append added in v0.7.0

func Append(indexers ...cache.Indexers) (cache.Indexers, error)

Append is a helper function that merged a set of indexers.

func AppendOrDie added in v0.7.0

func AppendOrDie(indexers ...cache.Indexers) cache.Indexers

func ByIndex added in v0.8.0

func ByIndex[T runtime.Object](indexer cache.Indexer, indexName, indexValue string) ([]T, error)

ByIndex returns all instances of T that match indexValue in indexName in indexer.

func ClusterAndGroupResourceValue added in v0.8.0

func ClusterAndGroupResourceValue(clusterName logicalcluster.Name, groupResource schema.GroupResource) string

ClusterAndGroupResourceValue returns the index value for use with IndexAPIBindingByClusterAndAcceptedClaimedGroupResources from clusterName and groupResource.

func ClusterScoped

func ClusterScoped() cache.Indexers

ClusterScoped returns cache.Indexers appropriate for cluster-scoped resources.

func IndexAPIBindingByClusterAndAcceptedClaimedGroupResources added in v0.8.0

func IndexAPIBindingByClusterAndAcceptedClaimedGroupResources(obj interface{}) ([]string, error)

IndexAPIBindingByClusterAndAcceptedClaimedGroupResources is an index function that indexes an APIBinding by its accepted permission claims' group resources.

func IndexAPIExportByIdentity

func IndexAPIExportByIdentity(obj interface{}) ([]string, error)

IndexAPIExportByIdentity is an index function that indexes an APIExport by its identity hash.

func IndexAPIExportBySecret added in v0.7.6

func IndexAPIExportBySecret(obj interface{}) ([]string, error)

IndexAPIExportBySecret is an index function that indexes an APIExport by its identity secret references. Index values are of the form <secret reference namespace>/<cluster name><separator><secret reference name> (cache keys).

func IndexByLogicalCluster

func IndexByLogicalCluster(obj interface{}) ([]string, error)

IndexByLogicalCluster is an index function that indexes by an object's logical cluster.

func IndexByLogicalClusterAndNamespace

func IndexByLogicalClusterAndNamespace(obj interface{}) ([]string, error)

IndexByLogicalClusterAndNamespace is an index function that indexes by an object's logical cluster and namespace.

func IndexBySyncerFinalizerKey added in v0.7.0

func IndexBySyncerFinalizerKey(obj interface{}) ([]string, error)

IndexBySyncerFinalizerKey indexes by syncer finalizer label keys.

func IndexSyncTargetsBySyncTargetKey added in v0.7.0

func IndexSyncTargetsBySyncTargetKey(obj interface{}) ([]string, error)

func NamespaceScoped

func NamespaceScoped() cache.Indexers

NamespaceScoped returns cache.Indexers appropriate for namespace-scoped resources.

Types

This section is empty.

Jump to

Keyboard shortcuts

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