Documentation
¶
Index ¶
- type ClusterClientGetter
- type Controller
- func (c *Controller) ClusterContext(parent context.Context, cluster logicalcluster.Name) (context.Context, context.CancelFunc)
- func (c *Controller) LookupURL(path logicalcluster.Path) (index.Result, bool)
- func (c *Controller) RecentlyMigrated(cluster logicalcluster.Name) bool
- func (c *Controller) Start(ctx context.Context, numThreads int)
- type Index
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterClientGetter ¶ added in v0.11.0
type ClusterClientGetter func(shard *corev1alpha1.Shard) (kcpclientset.ClusterInterface, error)
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller watches Shards on the root shard, and then starts informers for every Shard, watching the Workspaces on them. It then updates the workspace index, which maps logical clusters to shard URLs.
func NewController ¶
func NewController( ctx context.Context, shardInformer corev1alpha1informers.ShardInformer, clientGetter ClusterClientGetter, ) *Controller
func (*Controller) ClusterContext ¶ added in v0.33.0
func (c *Controller) ClusterContext(parent context.Context, cluster logicalcluster.Name) (context.Context, context.CancelFunc)
func (*Controller) LookupURL ¶ added in v0.11.0
func (c *Controller) LookupURL(path logicalcluster.Path) (index.Result, bool)
func (*Controller) RecentlyMigrated ¶ added in v0.33.0
func (c *Controller) RecentlyMigrated(cluster logicalcluster.Name) bool
type Index ¶
type Index interface {
LookupURL(path logicalcluster.Path) (index.Result, bool)
// RecentlyMigrated returns true if the given cluster was recently migrated.
RecentlyMigrated(cluster logicalcluster.Name) bool
// ClusterContext returns a context derived from the parent that will be
// cancelled when the cluster is deleted or migrated.
ClusterContext(parent context.Context, cluster logicalcluster.Name) (context.Context, context.CancelFunc)
}
Click to show internal directories.
Click to hide internal directories.