func NewInputReconciler(
	ctx context.Context,
	multiClusterReconcileFunc MultiClusterReconcileFunc,
	singleClusterReconcileFunc SingleClusterReconcileFunc,
	reconcileInterval time.Duration,
) InputReconciler {
	r := &inputReconciler{
		ctx:                        ctx,
		queue:                      workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()),
		multiClusterReconcileFunc:  multiClusterReconcileFunc,
		singleClusterReconcileFunc: singleClusterReconcileFunc,
	}
	go r.reconcileEventsForever(reconcileInterval)
	return r
}
Note(ilackarms): in the current implementation, the constructor
also starts the reconciler's event processor in a goroutine.
Make sure to cancel the parent context in order to ensure the goroutine started here is gc'ed.
only one event will be processed per reconcileInterval.
package input
import (
	"context"
	"time"
	"github.com/rotisserie/eris"
	"github.com/solo-io/skv2/contrib/pkg/sets"
	"github.com/solo-io/skv2/pkg/ezkube"
	"k8s.io/client-go/util/workqueue"
	"github.com/solo-io/go-utils/contextutils"
	"github.com/solo-io/skv2/pkg/reconcile"
)
type SingleClusterReconcileFunc func(id ezkube.ResourceId) (bool, error)
type MultiClusterReconcileFunc func(id ezkube.ClusterResourceId) (bool, error)
type InputReconciler interface {
	ReconcileLocalGeneric(id ezkube.ResourceId) (reconcile.Result, error)
	ReconcileRemoteGeneric(id ezkube.ClusterResourceId) (reconcile.Result, error)
}
type inputReconciler struct {
	ctx                        context.Context
	queue                      workqueue.RateLimitingInterface
	multiClusterReconcileFunc  MultiClusterReconcileFunc
	singleClusterReconcileFunc SingleClusterReconcileFunc
}