dmctl

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileContent

func GetFileContent(fpath string) ([]byte, error)

GetFileContent reads and returns file's content

Types

type DMMasterCtl

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

DMMasterCtl controls dm master

func CreateDMMasterCtl

func CreateDMMasterCtl(addr string) (*DMMasterCtl, error)

CreateDMMasterCtl creates dm-master client

func (*DMMasterCtl) OperateSQL

func (ctl *DMMasterCtl) OperateSQL(ctx context.Context, op pb.SQLOp, taskName, worker, pos, sqlPattern string, sharding bool, args []string) (*pb.HandleSQLsResponse, error)

func (*DMMasterCtl) QueryError

func (ctl *DMMasterCtl) QueryError(ctx context.Context, taskName string) (map[string]*pb.QueryErrorResponse, error)

QueryError shows status of tasks

func (*DMMasterCtl) QueryStatus

func (ctl *DMMasterCtl) QueryStatus(ctx context.Context, taskName string) (map[string]*pb.QueryStatusResponse, error)

QueryStatus shows status of tasks

func (*DMMasterCtl) QueryUnresolvedGroups

func (ctl *DMMasterCtl) QueryUnresolvedGroups(ctx context.Context, taskName string) (map[string]map[string][]*pb.ShardingGroup, error)

func (*DMMasterCtl) ReplaceSQL

func (ctl *DMMasterCtl) ReplaceSQL(ctx context.Context, taskName, worker, pos, sqlPattern string, sharding bool, args []string) (*pb.HandleSQLsResponse, error)

func (*DMMasterCtl) ResumeTask

func (ctl *DMMasterCtl) ResumeTask(ctx context.Context, taskName string, workers []string) (*pb.OperateTaskResponse, error)

ResumeTask resumes a paused task

func (*DMMasterCtl) SkipSQL

func (ctl *DMMasterCtl) SkipSQL(ctx context.Context, taskName, worker, pos, sqlPattern string, sharding bool) (*pb.HandleSQLsResponse, error)

SkipSQL skips specified binlog position or sql pattern

func (*DMMasterCtl) StartTask

func (ctl *DMMasterCtl) StartTask(ctx context.Context, task string, workers []string) error

StartTask starts task

func (*DMMasterCtl) StartTaskWithContent

func (ctl *DMMasterCtl) StartTaskWithContent(ctx context.Context, content string, workers []string) error

func (*DMMasterCtl) StopTask

func (ctl *DMMasterCtl) StopTask(ctx context.Context, task string, workers []string) error

StopTask stops task

func (*DMMasterCtl) UpdateMasterConfig

func (ctl *DMMasterCtl) UpdateMasterConfig(ctx context.Context, cfg string) error

Update master config online

Directories

Path Synopsis
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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