utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DMMasterPort = 8261
	DMWorkerPort = 8262
)

Functions

func IsErrTableNotExists

func IsErrTableNotExists(err error) bool

IsErrTableNotExists checks whether err is TableNotExists error

func SyncSplitTemplate

func SyncSplitTemplate(sourceHost, targetHost string, tableId int, path string) (string, error)

source should be an mysql at 3306 target should be an tidb at 4000.

func TaskTemplate

func TaskTemplate()

func TaskTemplateRender

func TaskTemplateRender(targetHost string, taskId int, path string) (string, error)

func UnImplemented

func UnImplemented()

The method is unimplemented.

Types

type Deploy

type Deploy struct {
	SourceID string `toml:"source-id"`
	DmWorker string `toml:"dm-worker"`
}

Deploy is a deploy config segment in dm-master.toml

type MasterConfig

type MasterConfig struct {
	MasterAddr string    `toml:"master-addr"`
	Deploy     []*Deploy `toml:"deploy"`
}

MasterConfig is used for creating dm master

func NewMasterConfig

func NewMasterConfig(deploy []*Deploy) *MasterConfig

NewMasterConfig creates new master config

Jump to

Keyboard shortcuts

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