relay

package
v0.0.0-...-6fba4f8 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader interface {
	// Run reads relay log.
	Run() context.CancelFunc

	//  Binlogs returns the channel for reading parsed binlogs.
	Binlogs() <-chan *obinlog.Binlog

	// Close releases resources.
	Close() error

	// Error returns error occurs in reading.
	Error() <-chan error
}

Reader is the interface for reading relay log.

func NewReader

func NewReader(dir string, readBufferSize int) (Reader, error)

NewReader creates a relay reader.

type Relayer

type Relayer interface {
	// WriteBinlog writes binlog to relay log file.
	WriteBinlog(schema string, table string, tiBinlog *tb.Binlog, pv *tb.PrewriteValue) (tb.Pos, error)

	// GCBinlog removes unused relay log files.
	GCBinlog(pos tb.Pos)

	// Close releases resources.
	Close() error
}

Relayer is the interface for writing relay log.

func NewRelayer

func NewRelayer(dir string, maxFileSize int64, tableInfoGetter translator.TableInfoGetter) (Relayer, error)

NewRelayer creates a relayer.

Jump to

Keyboard shortcuts

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