Documentation ¶
Index ¶
- Variables
- func CheckSyncConfig(ctx context.Context, cfgs []*config.SubTaskConfig, errCnt, warnCnt int64) (string, error)
- func RunCheckOnConfigs(ctx context.Context, cfgs []*config.SubTaskConfig, dumpWholeInstance bool, ...) (*checker.Results, error)
- type Checker
- func (c *Checker) Close()
- func (c *Checker) Error() interface{}
- func (c *Checker) Init(ctx context.Context) (err error)
- func (c *Checker) IsFreshTask() (bool, error)
- func (c *Checker) Pause()
- func (c *Checker) Process(ctx context.Context, pr chan pb.ProcessResult)
- func (c *Checker) Resume(ctx context.Context, pr chan pb.ProcessResult)
- func (c *Checker) Status(_ *binlog.SourceStatus) interface{}
- func (c *Checker) Type() pb.UnitType
- func (c *Checker) Update(ctx context.Context, cfg *config.SubTaskConfig) error
Constants ¶
This section is empty.
Variables ¶
var ( // CheckTaskMsgHeader used as the header of the error/warning message when checking config failed. CheckTaskMsgHeader = "fail to check synchronization configuration with type" CheckTaskSuccess = "pre-check is passed. " // CheckSyncConfigFunc holds the CheckSyncConfig function. CheckSyncConfigFunc func(ctx context.Context, cfgs []*config.SubTaskConfig, errCnt, warnCnt int64) (string, error) )
Functions ¶
func CheckSyncConfig ¶
func CheckSyncConfig(ctx context.Context, cfgs []*config.SubTaskConfig, errCnt, warnCnt int64) (string, error)
CheckSyncConfig checks synchronization configuration.
func RunCheckOnConfigs ¶
func RunCheckOnConfigs( ctx context.Context, cfgs []*config.SubTaskConfig, dumpWholeInstance bool, warnLimit, errLimit int64, ) (*checker.Results, error)
RunCheckOnConfigs returns the check result for given subtask configs. Caller should be noticed that result may be very large. The result will be truncated to `warnLimit` and `errLimit`, but the total count in summary will be the same as the original result.
when `dumpWholeInstance` is true, checker will require SELECT ON *.* privileges for SourceDumpPrivilegeChecker.
This function is used by cloud services.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker performs pre-check of data synchronization.
func NewChecker ¶
func NewChecker(cfgs []*config.SubTaskConfig, checkingItems map[string]string, errCnt, warnCnt int64) *Checker
NewChecker returns a checker.
func (*Checker) IsFreshTask ¶
IsFreshTask implements Unit.IsFreshTask.
func (*Checker) Process ¶
func (c *Checker) Process(ctx context.Context, pr chan pb.ProcessResult)
Process implements Unit interface.
func (*Checker) Resume ¶
func (c *Checker) Resume(ctx context.Context, pr chan pb.ProcessResult)
Resume resumes the paused process.
func (*Checker) Status ¶
func (c *Checker) Status(_ *binlog.SourceStatus) interface{}
Status implements Unit interface.