Documentation
¶
Index ¶
- Constants
- Variables
- type Operation
- type Reconciler
- func (r *Reconciler) AddToManager(mgr manager.Manager) error
- func (r *Reconciler) GetSelectedNamespaces(ctx context.Context, controllerRing *shardingv1alpha1.ControllerRing) (sets.Set[string], error)
- func (r *Reconciler) LeasePredicate() predicate.Predicate
- func (r *Reconciler) NewOperation(ctx context.Context, controllerRing *shardingv1alpha1.ControllerRing) (*Operation, error)
- func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)
Constants ¶
View Source
const ControllerName = "sharder"
ControllerName is the name of this controller.
Variables ¶
View Source
var ( // KeyForObject is an alias for key.ForObject, exposed for testing. KeyForObject = key.ForObject // KeyForController is an alias for key.ForController, exposed for testing. KeyForController = key.ForController )
Functions ¶
This section is empty.
Types ¶
type Operation ¶ added in v0.10.0
type Operation struct { Client client.Client Reader client.Reader ControllerRing *shardingv1alpha1.ControllerRing Namespaces sets.Set[string] HashRing *consistenthash.Ring Shards leases.Shards }
type Reconciler ¶
type Reconciler struct { Client client.Client Reader client.Reader Clock clock.PassiveClock Config *configv1alpha1.SharderConfig }
Reconciler reconciles ControllerRings.
func (*Reconciler) AddToManager ¶
func (r *Reconciler) AddToManager(mgr manager.Manager) error
AddToManager adds Reconciler to the given manager.
func (*Reconciler) GetSelectedNamespaces ¶ added in v0.10.0
func (r *Reconciler) GetSelectedNamespaces(ctx context.Context, controllerRing *shardingv1alpha1.ControllerRing) (sets.Set[string], error)
func (*Reconciler) LeasePredicate ¶
func (r *Reconciler) LeasePredicate() predicate.Predicate
func (*Reconciler) NewOperation ¶ added in v0.10.0
func (r *Reconciler) NewOperation(ctx context.Context, controllerRing *shardingv1alpha1.ControllerRing) (*Operation, error)
Click to show internal directories.
Click to hide internal directories.