dmcluster

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlInterface

type ControlInterface interface {
	// UpdateDMCluster implements the control logic for StatefulSet creation, update, and deletion
	UpdateDMCluster(*v1alpha1.DMCluster) error
}

ControlInterface implements the control logic for updating DMClusters 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 NewDefaultDMClusterControl

func NewDefaultDMClusterControl(
	dcControl controller.DMClusterControlInterface,
	masterMemberManager manager.DMManager,
	workerMemberManager manager.DMManager,
	reclaimPolicyManager manager.DMManager,
	orphanPodsCleaner member.OrphanPodsCleaner,
	pvcCleaner member.PVCCleanerInterface,
	pvcResizer member.PVCResizerInterface,
	discoveryManager member.TidbDiscoveryManager,
	conditionUpdater DMClusterConditionUpdater,
	recorder record.EventRecorder) ControlInterface

NewDefaultDMClusterControl returns a new instance of the default implementation DMClusterControlInterface that implements the documented semantics for DMClusters.

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller controls dmclusters.

func NewController

func NewController(deps *controller.Dependencies) *Controller

NewController creates a dm controller.

func (*Controller) Run

func (c *Controller) Run(workers int, stopCh <-chan struct{})

Run runs the dmcluster controller.

type DMClusterConditionUpdater

type DMClusterConditionUpdater interface {
	Update(*v1alpha1.DMCluster) error
}

DMClusterConditionUpdater interface that translates cluster state into into dm cluster status conditions.

type FakeDMClusterControlInterface

type FakeDMClusterControlInterface struct {
	// contains filtered or unexported fields
}

func NewFakeDMClusterControlInterface

func NewFakeDMClusterControlInterface() *FakeDMClusterControlInterface

func (*FakeDMClusterControlInterface) SetUpdateDCError

func (ftcc *FakeDMClusterControlInterface) SetUpdateDCError(err error)

func (*FakeDMClusterControlInterface) UpdateDMCluster

func (ftcc *FakeDMClusterControlInterface) UpdateDMCluster(_ *v1alpha1.DMCluster) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL