Thanks to visit codestin.com
Credit goes to pkg.go.dev

reconcile

package
v0.22.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 12

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 Func

type Func = reconcile.TypedFunc[Request]

Func is a function that implements the reconcile interface.

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) Cluster

func (r Request) Cluster() string

Cluster returns the name of the cluster that the request belongs to.

func (Request) String

func (r Request) String() string

String returns the general purpose string representation.

func (Request) WithCluster

func (r Request) WithCluster(name string) Request

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL