sync

package
v0.0.0-...-a8497ec Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaInfo

type MetaInfo struct {
	sync.RWMutex
	//binlog filename
	Name string
	//binlog position
	Pos uint32
	//server group, check server.group == meta.group
	Group string
	//save time
	LastSaveTime time.Time
	//server self role
	MyRole ha.NodeStatus
}

func NewMetaInfo

func NewMetaInfo(group string) (*MetaInfo, error)

func (*MetaInfo) Close

func (p *MetaInfo) Close()

func (*MetaInfo) Position

func (p *MetaInfo) Position() mysql.Position

func (*MetaInfo) Save

func (p *MetaInfo) Save(pos mysql.Position) error

type SyncClient

type SyncClient struct {
	MysqlDumpPath string

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSyncClient

func NewSyncClient(cfg *config.ServerConfig) (*SyncClient, error)

func (*SyncClient) Close

func (r *SyncClient) Close()

func (*SyncClient) Ctx

func (c *SyncClient) Ctx() context.Context

func (*SyncClient) IsRunaway

func (c *SyncClient) IsRunaway() (bool, string)

func (*SyncClient) RoleSwitch

func (c *SyncClient) RoleSwitch() chan<- ha.NodeStatus

func (*SyncClient) Start

func (c *SyncClient) Start() error

Jump to

Keyboard shortcuts

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