func NewCluster(
	etcd *v1alpha1.EtcdCluster,
	reconcileInterval time.Duration,
	statusReconcileInterval time.Duration,
	recorder record.EventRecorder,
	kubeClient clientset.Interface,
	etcdClient etcdClientSet.Interface,
	tAppClient tAppClientSet.Interface,
	etcdLister etcdLister.EtcdClusterLister,
	tAppLister tAppLister.TAppLister,
	podLister coreListers.PodLister,
	svcLister coreListers.ServiceLister,
	secretLister coreListers.SecretLister,
	cmLister coreListers.ConfigMapLister,
) *Cluster {
	return &Cluster{
		eventCh:                 make(chan struct{}, 1),
		stopCh:                  make(chan struct{}),
		etcd:                    etcd,
		reconcileInterval:       reconcileInterval,
		statusReconcileInterval: statusReconcileInterval,
		recorder:                recorder,
		kubeClient:              kubeClient,
		etcdClient:              etcdClient,
		tAppClient:              tAppClient,
		etcdLister:              etcdLister,
		tAppLister:              tAppLister,
		podLister:               podLister,
		svcLister:               svcLister,
		secretLister:            secretLister,
		cmLister:                cmLister,
		lastSync:                time.Now().Add(-1 * reconcileInterval),
		lastStatusSync:          time.Now().Add(-1 * statusReconcileInterval),
	}
}
// NewCluster construct Cluster to control the etcd cluster's lifecycle
NewCluster construct Cluster to control the etcd cluster's lifecycle
// NewCluster construct Cluster to control the etcd cluster ' s lifecycle
func NewCluster(
	etcd *v1alpha1.EtcdCluster,
	reconcileInterval time.Duration,
	statusReconcileInterval time.Duration,
	recorder record.EventRecorder,
	kubeClient clientset.Interface,
	etcdClient etcdClientSet.Interface,
	tAppClient tAppClientSet.Interface,
	etcdLister etcdLister.EtcdClusterLister,
	tAppLister tAppLister.TAppLister,
	podLister coreListers.PodLister,
	svcLister coreListers.ServiceLister,
	secretLister coreListers.SecretLister,
	cmLister coreListers.ConfigMapLister,
) *Cluster {
	return &Cluster{
		eventCh:                 make(chan struct{}, 1),
		stopCh:                  make(chan struct{}),
		etcd:                    etcd,
		reconcileInterval:       reconcileInterval,
		statusReconcileInterval: statusReconcileInterval,
		recorder:                recorder,
		kubeClient:              kubeClient,
		etcdClient:              etcdClient,
		tAppClient:              tAppClient,
		etcdLister:              etcdLister,
		tAppLister:              tAppLister,
		podLister:               podLister,
		svcLister:               svcLister,
		secretLister:            secretLister,
		cmLister:                cmLister,
		lastSync:                time.Now().Add(-1 * reconcileInterval),
		lastStatusSync:          time.Now().Add(-1 * statusReconcileInterval),
	}
}
func NewCluster ( etcd * v1alpha1 . EtcdCluster , reconcileInterval time . Duration , statusReconcileInterval time . Duration , recorder record . EventRecorder , kubeClient clientset . Interface , etcdClient etcdClientSet . Interface , tAppClient tAppClientSet . Interface , etcdLister etcdLister . EtcdClusterLister , tAppLister tAppLister . TAppLister , podLister coreListers . PodLister , svcLister coreListers . ServiceLister , secretLister coreListers . SecretLister , cmLister coreListers . ConfigMapLister , ) * Cluster { return & Cluster { eventCh : make ( chan struct { } , 1 ) , stopCh : make ( chan struct { } ) , etcd : etcd , reconcileInterval : reconcileInterval , statusReconcileInterval : statusReconcileInterval , recorder : recorder , kubeClient : kubeClient , etcdClient : etcdClient , tAppClient : tAppClient , etcdLister : etcdLister , tAppLister : tAppLister , podLister : podLister , svcLister : svcLister , secretLister : secretLister , cmLister : cmLister , lastSync : time . Now ( ) . Add ( - 1 * reconcileInterval ) , lastStatusSync : time . Now ( ) . Add ( - 1 * statusReconcileInterval ) , } }
NewCluster construct Cluster to control the etcd cluster's lifecycle
NewCluster construct Cluster to control the etcd cluster ' s lifecycle