Documentation
¶
Index ¶
- Constants
- func APIBindingBoundResourceValue(clusterName logicalcluster.Name, group, resource string) string
- func AddIfNotPresentOrDie(indexer cache.Indexer, toAdd cache.Indexers)
- func Append(indexers ...cache.Indexers) (cache.Indexers, error)
- func AppendOrDie(indexers ...cache.Indexers) cache.Indexers
- func ByIndex[T runtime.Object](indexer cache.Indexer, indexName, indexValue string) ([]T, error)
- func ByIndexWithFallback[T runtime.Object](indexer, globalIndexer cache.Indexer, indexName, indexValue string) ([]T, error)
- func ByPathAndName[T runtime.Object](groupResource schema.GroupResource, indexer cache.Indexer, ...) (ret T, err error)
- func ByPathAndNameWithFallback[T runtime.Object](groupResource schema.GroupResource, indexer, globalIndexer cache.Indexer, ...) (ret T, err error)
- func ClusterAndGroupResourceValue(clusterName logicalcluster.Name, groupResource schema.GroupResource) string
- func IndexAPIBindingByAPIExport(obj interface{}) ([]string, error)
- func IndexAPIBindingByBoundResourceUID(obj interface{}) ([]string, error)
- func IndexAPIBindingByBoundResources(obj interface{}) ([]string, error)
- func IndexAPIBindingByClusterAndAcceptedClaimedGroupResources(obj interface{}) ([]string, error)
- func IndexAPIExportByClaimedIdentities(obj interface{}) ([]string, error)
- func IndexAPIExportByIdentity(obj interface{}) ([]string, error)
- func IndexAPIExportBySecret(obj interface{}) ([]string, error)
- func IndexByLogicalClusterPath(obj interface{}) ([]string, error)
- func IndexByLogicalClusterPathAndName(obj interface{}) ([]string, error)
Constants ¶
const ( // APIExportByIdentity is the indexer name for retrieving APIExports by identity hash. APIExportByIdentity = "APIExportByIdentity" // APIExportBySecret is the indexer name for retrieving APIExports by secret. APIExportBySecret = "APIExportSecret" // APIExportByClaimedIdentities is the indexer name for retrieving APIExports that have a permission claim for a // particular identity hash. APIExportByClaimedIdentities = "APIExportByClaimedIdentities" )
const ( // APIBindingByClusterAndAcceptedClaimedGroupResources is the name for the index that indexes an APIBinding by its // cluster name and accepted claimed group resources. APIBindingByClusterAndAcceptedClaimedGroupResources = "byClusterAndAcceptedClaimedGroupResources" // ByLogicalClusterPath indexes by logical cluster path, if the annotation exists. ByLogicalClusterPath = "ByLogicalClusterPath" // ByLogicalClusterPathAndName indexes by logical cluster path and object name, if the annotation exists. ByLogicalClusterPathAndName = "ByLogicalClusterPathAndName" )
const APIBindingByBoundResourceUID = "byBoundResourceUID"
const APIBindingByBoundResources = "byBoundResources"
const APIBindingsByAPIExport = "APIBindingByAPIExport"
Variables ¶
This section is empty.
Functions ¶
func APIBindingBoundResourceValue ¶ added in v0.9.0
func AddIfNotPresentOrDie ¶ added in v0.7.6
AddIfNotPresentOrDie tries to add everything from toAdd to indexer's indexers that does not already exist. It panics if it encounters an error.
func ByIndex ¶ added in v0.8.0
ByIndex returns all instances of T that match indexValue in indexName in indexer.
func ByIndexWithFallback ¶ added in v0.20.0
func ByIndexWithFallback[T runtime.Object](indexer, globalIndexer cache.Indexer, indexName, indexValue string) ([]T, error)
ByIndexWithFallback returns all instances of T that match indexValue in indexer, if any. If none match, the same query is done of globalIndexer. Any errors short-circuit this logic.
func ByPathAndName ¶ added in v0.11.0
func ByPathAndName[T runtime.Object](groupResource schema.GroupResource, indexer cache.Indexer, path logicalcluster.Path, name string) (ret T, err error)
ByPathAndName returns the instance of T from the indexer with the matching path and name. Path may be a canonical path or a cluster name. Note: this depends on the presence of the optional "kcp.io/path" annotation.
func ByPathAndNameWithFallback ¶ added in v0.20.0
func ByPathAndNameWithFallback[T runtime.Object](groupResource schema.GroupResource, indexer, globalIndexer cache.Indexer, path logicalcluster.Path, name string) (ret T, err error)
ByPathAndNameWithFallback returns the instance of T from the indexer with the matching path and name. Path may be a canonical path or a cluster name. Note: this depends on the presence of the optional "kcp.io/path" annotation. If no instance is found, globalIndexer is searched as well. Any errors short-circuit this logic.
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 IndexAPIBindingByAPIExport ¶ added in v0.10.0
IndexAPIBindingByAPIExport indexes the APIBindings by their APIExport's Reference Path and Name.
func IndexAPIBindingByBoundResourceUID ¶ added in v0.10.0
func IndexAPIBindingByBoundResources ¶ added in v0.9.0
func IndexAPIBindingByClusterAndAcceptedClaimedGroupResources ¶ added in v0.8.0
IndexAPIBindingByClusterAndAcceptedClaimedGroupResources is an index function that indexes an APIBinding by its accepted permission claims' group resources.
func IndexAPIExportByClaimedIdentities ¶ added in v0.11.0
IndexAPIExportByClaimedIdentities is an index function that indexes an APIExport by its permission claims' identity hashes.
func IndexAPIExportByIdentity ¶
IndexAPIExportByIdentity is an index function that indexes an APIExport by its identity hash.
func IndexAPIExportBySecret ¶ added in v0.7.6
IndexAPIExportBySecret is an index function that indexes an APIExport by its identity secret references. Index values are of the form <cluster name>|<secret reference namespace>/<secret reference name> (cache keys).
func IndexByLogicalClusterPath ¶ added in v0.11.0
IndexByLogicalClusterPath indexes by logical cluster path, if the annotation exists.
func IndexByLogicalClusterPathAndName ¶ added in v0.11.0
IndexByLogicalClusterPathAndName indexes by logical cluster path and object name, if the annotation exists.
Types ¶
This section is empty.