Documentation
¶
Index ¶
- func ClusterAndNamespaceIndexFunc(obj any) ([]string, error)
- func ClusterAndNamespaceIndexKey(clusterName logicalcluster.Name, namespace string) string
- func ClusterIndexFunc(obj any) ([]string, error)
- func ClusterIndexKey(clusterName logicalcluster.Name) string
- type AggregateCache
- type Lister
- type ScopedCluster
- func (c *ScopedCluster) GetAPIReader() client.Reader
- func (c *ScopedCluster) GetCache() cache.Cache
- func (c *ScopedCluster) GetClient() client.Client
- func (c *ScopedCluster) GetConfig() *rest.Config
- func (c *ScopedCluster) GetEventRecorder(name string) events.EventRecorder
- func (c *ScopedCluster) GetEventRecorderFor(name string) record.EventRecorderdeprecated
- func (c *ScopedCluster) GetFieldIndexer() client.FieldIndexer
- func (c *ScopedCluster) GetHTTPClient() *http.Client
- func (c *ScopedCluster) GetRESTMapper() meta.RESTMapper
- func (c *ScopedCluster) GetScheme() *runtime.Scheme
- func (c *ScopedCluster) Start(ctx context.Context) error
- type WildcardCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterAndNamespaceIndexFunc ¶
ClusterAndNamespaceIndexFunc indexes by cluster and namespace name.
func ClusterAndNamespaceIndexKey ¶
func ClusterAndNamespaceIndexKey(clusterName logicalcluster.Name, namespace string) string
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.
Types ¶
type AggregateCache ¶ added in v0.7.0
type AggregateCache struct {
// contains filtered or unexported fields
}
AggregateCache provides an aggregated view across multiple per-shard WildcardCaches.
func NewAggregateCache ¶ added in v0.7.0
func NewAggregateCache() *AggregateCache
NewAggregateCache returns an initialized AggregateCache.
func (*AggregateCache) AddCache ¶ added in v0.7.0
func (a *AggregateCache) AddCache(id string, c WildcardCache)
AddCache registers a WildcardCache under the given id.
func (*AggregateCache) List ¶ added in v0.7.0
func (a *AggregateCache) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List aggregates results from all registered caches. If any error occurred while aggregating results from all caches the errors will be returned as an errors.Aggregate. Even if errors are returned the list will be filled with any results that could be aggregated.
func (*AggregateCache) RemoveCache ¶ added in v0.7.0
func (a *AggregateCache) RemoveCache(id string)
RemoveCache unregisters the WildcardCache with the given id.
type Lister ¶ added in v0.7.0
type Lister interface {
List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
}
Lister can list objects across all registered shard caches.
type ScopedCluster ¶
type ScopedCluster struct {
// contains filtered or unexported fields
}
ScopedCluster is a cluster that operates on a specific namespace.
func NewScopedCluster ¶
func NewScopedCluster(cfg *rest.Config, clusterName logicalcluster.Name, wildcardCA WildcardCache, scheme *runtime.Scheme, eventRecorderGetter mcrecorder.EventRecorderGetter) (*ScopedCluster, error)
NewScopedCluster constructs a new cluster.Cluster that operates on a specific logical cluster.
func NewScopedInitializingCluster ¶
func NewScopedInitializingCluster(cfg *rest.Config, clusterName logicalcluster.Name, wildcardCA WildcardCache, scheme *runtime.Scheme) (*ScopedCluster, error)
NewScopedInitializingCluster constructs a new cluster.Cluster that operates on a specific logical cluster for initializing workspaces. It doesn't construct client to read from wildcard cache.
func (*ScopedCluster) GetAPIReader ¶
func (c *ScopedCluster) GetAPIReader() client.Reader
GetAPIReader returns a reader against the cluster.
func (*ScopedCluster) GetCache ¶
func (c *ScopedCluster) GetCache() cache.Cache
GetCache returns a cache.Cache.
func (*ScopedCluster) GetClient ¶
func (c *ScopedCluster) GetClient() client.Client
GetClient returns a client scoped to the namespace.
func (*ScopedCluster) GetConfig ¶
func (c *ScopedCluster) GetConfig() *rest.Config
GetConfig returns the rest.Config scoped to the cluster.
func (*ScopedCluster) GetEventRecorder ¶ added in v0.5.0
func (c *ScopedCluster) GetEventRecorder(name string) events.EventRecorder
GetEventRecorder returns a EventRecorder for the given name.
func (*ScopedCluster) GetEventRecorderFor
deprecated
func (c *ScopedCluster) GetEventRecorderFor(name string) record.EventRecorder
GetEventRecorderFor returns a new EventRecorder for the provided name.
Deprecated: Use GetEventRecorder.
func (*ScopedCluster) GetFieldIndexer ¶
func (c *ScopedCluster) GetFieldIndexer() client.FieldIndexer
GetFieldIndexer returns a FieldIndexer scoped to the cluster.
func (*ScopedCluster) GetHTTPClient ¶
func (c *ScopedCluster) GetHTTPClient() *http.Client
GetHTTPClient returns the HTTP client scoped to the cluster.
func (*ScopedCluster) GetRESTMapper ¶
func (c *ScopedCluster) GetRESTMapper() meta.RESTMapper
GetRESTMapper returns a RESTMapper scoped to the cluster.
func (*ScopedCluster) GetScheme ¶
func (c *ScopedCluster) GetScheme() *runtime.Scheme
GetScheme returns the scheme scoped to the cluster.
type WildcardCache ¶
WildcardCache is a cache that operates on a '/clusters/*' endpoint.
func NewWildcardCache ¶
NewWildcardCache returns a cache.Cache that handles multi-cluster watches against a /clusters/* endpoint. It wires SharedIndexInformers with additional indexes for cluster and cluster+namespace.