Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlInterface ¶
type ControlInterface interface { // UpdateTidbCluster implements the control logic for StatefulSet creation, update, and deletion UpdateTidbCluster(*v1alpha1.TidbCluster) error }
ControlInterface implements the control logic for updating TidbClusters 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 NewDefaultTidbClusterControl ¶
func NewDefaultTidbClusterControl( statusUpdater StatusUpdaterInterface, pdMemberManager manager.Manager, tikvMemberManager manager.Manager, tidbMemberManager manager.Manager, reclaimPolicyManager manager.Manager, metaManager manager.Manager, recorder record.EventRecorder) ControlInterface
NewDefaultTidbClusterControl returns a new instance of the default implementation TidbClusterControlInterface that implements the documented semantics for TidbClusters.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller controls tidbclusters.
func NewController ¶
func NewController( kubeCli kubernetes.Interface, cli versioned.Interface, informerFactory informers.SharedInformerFactory, kubeInformerFactory kubeinformers.SharedInformerFactory, ) *Controller
NewController creates a tidbcluster controller.
func (*Controller) Run ¶
func (tcc *Controller) Run(workers int, stopCh <-chan struct{})
Run runs the tidbcluster controller.
type StatusUpdaterInterface ¶
type StatusUpdaterInterface interface { // UpdateTidbClusterStatus sets the tidbCluster's Status to status. Implementations are required to retry on conflicts, // but fail on other errors. If the returned error is nil tidbCluster's Status has been successfully set to status. UpdateTidbClusterStatus(*v1alpha1.TidbCluster, *v1alpha1.TidbClusterStatus) error }
StatusUpdaterInterface is an interface used to update the TidbClusterStatus associated with a TidbCluster. For any use other than testing, clients should create an instance using NewRealTidbClusterStatusUpdater.
func NewRealTidbClusterStatusUpdater ¶
func NewRealTidbClusterStatusUpdater( cli versioned.Interface, tcLister v1listers.TidbClusterLister) StatusUpdaterInterface
NewRealTidbClusterStatusUpdater returns a StatusUpdaterInterface that updates the Status of a TidbCluster, using the supplied client and setLister.