checker

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorMsgHeader used as the header of the error message when checking config failed.
	ErrorMsgHeader = "fail to check synchronization configuration with type"

	// CheckSyncConfigFunc holds the CheckSyncConfig function
	CheckSyncConfigFunc func(ctx context.Context, cfgs []*config.SubTaskConfig) error
)

Functions

func CheckSyncConfig

func CheckSyncConfig(ctx context.Context, cfgs []*config.SubTaskConfig) error

CheckSyncConfig checks synchronization configuration

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) *Checker

NewChecker returns a checker

func (*Checker) Close

func (c *Checker) Close()

Close implements Unit interface

func (*Checker) Error

func (c *Checker) Error() interface{}

Error implements Unit interface

func (*Checker) Init

func (c *Checker) Init(ctx context.Context) (err error)

Init implements Unit interface

func (*Checker) IsFreshTask

func (c *Checker) IsFreshTask() (bool, error)

IsFreshTask implements Unit.IsFreshTask

func (*Checker) Pause

func (c *Checker) Pause()

Pause implements Unit interface

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() interface{}

Status implements Unit interface

func (*Checker) Type

func (c *Checker) Type() pb.UnitType

Type implements Unit interface

func (*Checker) Update

func (c *Checker) Update(cfg *config.SubTaskConfig) error

Update implements Unit.Update

Jump to

Keyboard shortcuts

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