Documentation ¶
Index ¶
- func NewClusterClient(ctx context.Context, c client.Client, cluster client.ObjectKey, ...) (client.Client, error)
- func RESTConfig(ctx context.Context, c client.Reader, cluster client.ObjectKey) (*restclient.Config, error)
- type ClusterCacheReconciler
- type ClusterCacheTracker
- type ClusterClientGetter
- type WatchInput
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterCacheReconciler ¶ added in v0.3.6
type ClusterCacheReconciler struct {
// contains filtered or unexported fields
}
ClusterCacheReconciler is responsible for stopping remote cluster caches when the cluster for the remote cache is being deleted.
func NewClusterCacheReconciler ¶ added in v0.3.6
func NewClusterCacheReconciler( log logr.Logger, mgr ctrl.Manager, controllerOptions controller.Options, cct *ClusterCacheTracker, ) (*ClusterCacheReconciler, error)
type ClusterCacheTracker ¶ added in v0.3.6
type ClusterCacheTracker struct {
// contains filtered or unexported fields
}
ClusterCacheTracker manages client caches for workload clusters.
func NewClusterCacheTracker ¶ added in v0.3.6
NewClusterCacheTracker creates a new ClusterCacheTracker.
func (*ClusterCacheTracker) Watch ¶ added in v0.3.6
func (m *ClusterCacheTracker) Watch(ctx context.Context, input WatchInput) error
Watch watches a remote cluster for resource events. If the watch already exists based on cluster, watcher, kind, and eventHandler, then this is a no-op.
type ClusterClientGetter ¶ added in v0.3.0
type ClusterClientGetter func(ctx context.Context, c client.Client, cluster client.ObjectKey, scheme *runtime.Scheme) (client.Client, error)
ClusterClientGetter returns a new remote client.
type WatchInput ¶ added in v0.3.6
type WatchInput struct { // Cluster is the key for the remote cluster. Cluster client.ObjectKey // Watcher is the watcher (controller) whose Reconcile() function will be called for events. Watcher Watcher // Kind is the type of resource to watch. Kind runtime.Object // CacheOptions are used to specify options for the remote cache, such as the Scheme to use. CacheOptions cache.Options // EventHandler contains the event handlers to invoke for resource events. EventHandler handler.EventHandler // Predicates is used to filter resource events. Predicates []predicate.Predicate }
WatchInput specifies the parameters used to establish a new watch for a remote cluster.
type Watcher ¶ added in v0.3.6
type Watcher interface { // Watch watches src for changes, sending events to eventHandler if they pass predicates. Watch(src source.Source, eventHandler handler.EventHandler, predicates ...predicate.Predicate) error }
Watcher is a scoped-down interface from Controller that only knows how to watch.
Click to show internal directories.
Click to hide internal directories.