Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlInterface ¶
type ControlInterface interface { // UpdateTikvCluster implements the control logic for StatefulSet creation, update, and deletion UpdateTikvCluster(*v1alpha1.TikvCluster) error }
ControlInterface implements the control logic for updating TikvClusters and their children StatefulSets. It is implemented as an interface to allow for extensions that provide different semantics. Currently, there is only one implementation.
func NewDefaultTikvClusterControl ¶
func NewDefaultTikvClusterControl( tcControl controller.TikvClusterControlInterface, pdMemberManager manager.Manager, tikvMemberManager manager.Manager, metaManager manager.Manager, orphanPodsCleaner member.OrphanPodsCleaner, discoveryManager member.PDDiscoveryManager, conditionUpdater TikvClusterConditionUpdater, recorder record.EventRecorder) ControlInterface
NewDefaultTikvClusterControl returns a new instance of the default implementation TikvClusterControlInterface that implements the documented semantics for TikvClusters.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller controls tikvclusters.
func NewController ¶
func NewController( kubeCli kubernetes.Interface, cli versioned.Interface, genericCli client.Client, informerFactory informers.SharedInformerFactory, kubeInformerFactory kubeinformers.SharedInformerFactory, autoFailover bool, pdFailoverPeriod time.Duration, tikvFailoverPeriod time.Duration, ) *Controller
NewController creates a tikvcluster controller.
func (*Controller) Run ¶
func (tcc *Controller) Run(workers int, stopCh <-chan struct{})
Run runs the tikvcluster controller.
type FakeTikvClusterControlInterface ¶
type FakeTikvClusterControlInterface struct {
// contains filtered or unexported fields
}
func NewFakeTikvClusterControlInterface ¶
func NewFakeTikvClusterControlInterface() *FakeTikvClusterControlInterface
func (*FakeTikvClusterControlInterface) SetUpdateTCError ¶
func (ftcc *FakeTikvClusterControlInterface) SetUpdateTCError(err error)
func (*FakeTikvClusterControlInterface) UpdateTikvCluster ¶
func (ftcc *FakeTikvClusterControlInterface) UpdateTikvCluster(_ *v1alpha1.TikvCluster) error
type TikvClusterConditionUpdater ¶
type TikvClusterConditionUpdater interface {
Update(*v1alpha1.TikvCluster) error
}
TikvClusterConditionUpdater interface that translates cluster state into into tikv cluster status conditions.