Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClusterNotFoundWrapper ¶
func NewClusterNotFoundWrapper[request comparable](w reconcile.TypedReconciler[request]) reconcile.TypedReconciler[request]
NewClusterNotFoundWrapper creates a new ClusterNotFoundWrapper.
Types ¶
type ClusterAware ¶
type ClusterAware[request comparable] interface { comparable fmt.Stringer Cluster() string WithCluster(string) request }
ClusterAware is a request that is aware of the cluster it belongs to.
type ClusterNotFoundWrapper ¶
type ClusterNotFoundWrapper[request comparable] struct { // contains filtered or unexported fields }
ClusterNotFoundWrapper wraps an existing reconcile.TypedReconciler and ignores multicluster.ErrClusterNotFound errors.
func (*ClusterNotFoundWrapper[request]) Reconcile ¶
func (r *ClusterNotFoundWrapper[request]) Reconcile(ctx context.Context, req request) (reconcile.Result, error)
Reconcile implements reconcile.TypedReconciler.
func (*ClusterNotFoundWrapper[request]) String ¶
func (r *ClusterNotFoundWrapper[request]) String() string
String returns a string representation of the wrapped reconciler.
type Reconciler ¶
type Reconciler = reconcile.TypedReconciler[Request]
Reconciler is a type that implements the reconcile interface.
type Request ¶
type Request struct {
reconcile.Request
// ClusterName is the name of the cluster that the request belongs to.
ClusterName string
}
Request extends a reconcile.Request by adding the cluster name.
func (Request) WithCluster ¶
WithCluster sets the name of the cluster that the request belongs to.
type WithCluster ¶
type WithCluster[request comparable] struct { Request request ClusterName string }
WithCluster extends a request with a cluster name.
func (WithCluster[request]) Cluster ¶
func (r WithCluster[request]) Cluster() string
Cluster returns the name of the cluster that the request belongs to.
func (WithCluster[request]) String ¶
func (r WithCluster[request]) String() string
String returns the string representation.
func (WithCluster[request]) WithCluster ¶
func (r WithCluster[request]) WithCluster(name string) WithCluster[request]
WithCluster sets the name of the cluster that the request belongs to.