binlog

package
v0.2.1-0...-d023f04 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StageFinishedReadingOneBinlogSwitchingToNextBinlog = "Finished reading one binlog; switching to next binlog"
	StageRegisteringSlaveOnMaster                      = "Registering slave on master"
	StageRequestingBinlogDump                          = "Requesting binlog dump"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BinlogReader

type BinlogReader struct {
	ReMap map[string]*regexp.Regexp // This is a cache for regexp.

	CurrentGtidSet      *gomysql.MysqlGTIDSet
	CurrentGtidSetMutex sync.RWMutex

	BigTxCount int32
	// contains filtered or unexported fields
}

func NewBinlogReader

func NewBinlogReader(
	execCtx *common.ExecContext, cfg *common.MySQLDriverConfig, logger g.LoggerType,
	replicateDoDb map[string]*common.SchemaContext, sqleContext *sqle.Context,
	memory *int64, db *gosql.DB, targetGtid string, lctn mysqlconfig.LowerCaseTableNamesValue,
	ctx context.Context) (binlogReader *BinlogReader, err error)

func (*BinlogReader) Close

func (b *BinlogReader) Close() error

func (*BinlogReader) ConnectBinlogStreamer

func (b *BinlogReader) ConnectBinlogStreamer(coordinates common.MySQLCoordinates) (err error)

func (*BinlogReader) CurrentGtidSetContains

func (b *BinlogReader) CurrentGtidSetContains(o gomysql.GTIDSet) (r bool)

func (*BinlogReader) DataStreamEvents

func (b *BinlogReader) DataStreamEvents(entriesChannel chan<- *common.EntryContext) error

func (*BinlogReader) GetCurrentBinlogCoordinates

func (b *BinlogReader) GetCurrentBinlogCoordinates() *common.MySQLCoordinates

func (*BinlogReader) GetExtractedTxCount

func (b *BinlogReader) GetExtractedTxCount() uint32

func (*BinlogReader) GetQueueMem

func (b *BinlogReader) GetQueueMem() int64

func (*BinlogReader) GetQueueSize

func (b *BinlogReader) GetQueueSize() int

func (*BinlogReader) OnApplierRotate

func (b *BinlogReader) OnApplierRotate(binlogFile string)

func (*BinlogReader) SetTargetGtid

func (b *BinlogReader) SetTargetGtid(gtid string) (err error)

type SqlFilter

type SqlFilter struct {
	NoDML       bool
	NoDMLInsert bool
	NoDMLDelete bool
	NoDMLUpdate bool

	NoDDL             bool
	NoDDLCreateSchema bool
	NoDDLCreateTable  bool
	NoDDLDropSchema   bool
	NoDDLDropTable    bool
	NoDDLDropIndex    bool
	NoDDLAlterTable   bool
	NoDDLTruncate     bool

	NoDDLAlterTableAddColumn    bool
	NoDDLAlterTableDropColumn   bool
	NoDDLAlterTableModifyColumn bool
	NoDDLAlterTableChangeColumn bool
	NoDDLAlterTableAlterColumn  bool
}

Jump to

Keyboard shortcuts

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