position

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindPositionFileNotCreate added in v0.3.0

func FindPositionFileNotCreate(filePath string, initPositionData string)

func GetPositionFilePath added in v0.3.0

func GetPositionFilePath(conf *config.BaseConfig) string

Types

type MongoPosition

type MongoPosition struct {
	sync.RWMutex

	FilePath string

	InitStartPosition time.Time
	// contains filtered or unexported fields
}

func (*MongoPosition) Close added in v0.3.0

func (pos *MongoPosition) Close()

func (*MongoPosition) LoadPosition added in v0.3.0

func (pos *MongoPosition) LoadPosition(config *config.BaseConfig)

func (*MongoPosition) ModifyPosition added in v0.3.0

func (pos *MongoPosition) ModifyPosition(v string) error

func (*MongoPosition) SavePosition added in v0.3.0

func (pos *MongoPosition) SavePosition() error

func (*MongoPosition) StartPosition added in v0.3.0

func (pos *MongoPosition) StartPosition()

type MysqlBasePosition added in v0.3.2

type MysqlBasePosition struct {
	BinlogName string `toml:"binlog-name"`
	BinlogPos  uint32 `toml:"binlog-pos"`
	BinlogGTID string `toml:"binlog-gtid"`
}

type MysqlPosition added in v0.3.0

type MysqlPosition struct {
	sync.RWMutex
	*MysqlBasePosition
	FilePath string
	// contains filtered or unexported fields
}

func (*MysqlPosition) Close added in v0.3.0

func (pos *MysqlPosition) Close()

func (*MysqlPosition) LoadPosition added in v0.3.0

func (pos *MysqlPosition) LoadPosition(config *config.BaseConfig)

func (*MysqlPosition) ModifyPosition added in v0.3.0

func (pos *MysqlPosition) ModifyPosition(v string) error

func (*MysqlPosition) SavePosition added in v0.3.0

func (pos *MysqlPosition) SavePosition() error

func (*MysqlPosition) StartPosition added in v0.3.0

func (pos *MysqlPosition) StartPosition()

type Position

type Position interface {
	LoadPosition(config *config.BaseConfig)
	SavePosition() error
	ModifyPosition(v string) error
	StartPosition()
	Close()
}

Jump to

Keyboard shortcuts

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