func newDefaultInstancesReconcileReactor(ctx context.Context, k8sClient client.Client, cloudMapSDK services.CloudMap, log logr.Logger) *defaultInstancesReconcileReactor {
	instancesCache := newDefaultInstancesCache(cloudMapSDK)
	reactor := &defaultInstancesReconcileReactor{
		cloudMapSDK:                       cloudMapSDK,
		instancesCache:                    instancesCache,
		reconcileRequestChan:              make(chan instancesReconcileRequest, defaultInstancesReconcileReactorRequestChanBuffer),
		reconcileTaskByServiceSubset:      make(map[serviceSubsetID]*instancesReconcileTask),
		reconcileTaskByServiceSubsetMutex: sync.RWMutex{},
		log:                               log,
	}
	go reactor.reactorLoop(ctx)
	return reactor
}
newDefaultInstancesReconcileReactor constructs new defaultInstancesReconcileReactor
package cloudmap
import (
	"context"
	"github.com/aws/aws-app-mesh-controller-for-k8s/pkg/aws/services"
	"github.com/go-logr/logr"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sync"
)
const (
	defaultInstancesReconcileReactorRequestChanBuffer = 10
)
type instancesReconcileReactor interface {
	Submit(ctx context.Context, service serviceSummary, subset serviceSubset, readyInstanceInfoByID map[string]instanceInfo, unreadyInstanceInfoByID map[string]instanceInfo) <-chan error
}