Documentation ¶
Index ¶
- type BlackHoleReader
- func (br *BlackHoleReader) Close() error
- func (br *BlackHoleReader) ReadMeta(ctx context.Context) (checkpointTs, resolvedTs uint64, err error)
- func (br *BlackHoleReader) ReadNextDDL(ctx context.Context) (*model.DDLEvent, error)
- func (br *BlackHoleReader) ReadNextRow(ctx context.Context) (*model.RowChangedEvent, error)
- func (br *BlackHoleReader) Run(ctx context.Context) error
- type LogReader
- func (l *LogReader) ReadMeta(ctx context.Context) (checkpointTs, resolvedTs uint64, err error)
- func (l *LogReader) ReadNextDDL(ctx context.Context) (*model.DDLEvent, error)
- func (l *LogReader) ReadNextRow(ctx context.Context) (*model.RowChangedEvent, error)
- func (l *LogReader) Run(ctx context.Context) error
- type LogReaderConfig
- type RedoLogReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlackHoleReader ¶
type BlackHoleReader struct{}
BlackHoleReader is a blockHole storage which implements LogReader interface
func (*BlackHoleReader) Close ¶
func (br *BlackHoleReader) Close() error
Close implement the Close interface
func (*BlackHoleReader) ReadMeta ¶
func (br *BlackHoleReader) ReadMeta(ctx context.Context) (checkpointTs, resolvedTs uint64, err error)
ReadMeta implements LogReader.ReadMeta
func (*BlackHoleReader) ReadNextDDL ¶
ReadNextDDL implements LogReader.ReadNextDDL
func (*BlackHoleReader) ReadNextRow ¶
func (br *BlackHoleReader) ReadNextRow(ctx context.Context) (*model.RowChangedEvent, error)
ReadNextRow implements LogReader.ReadNextRow
type LogReader ¶
type LogReader struct {
// contains filtered or unexported fields
}
LogReader implement RedoLogReader interface
func (*LogReader) ReadNextDDL ¶
ReadNextDDL implement the `RedoLogReader` interface.
func (*LogReader) ReadNextRow ¶
ReadNextRow implement the `RedoLogReader` interface.
type LogReaderConfig ¶
type LogReaderConfig struct { // Dir is the folder contains the redo logs need to apply when OP environment or // the folder used to download redo logs to if using external storage, such as s3 // and gcs. Dir string // URI should be like "s3://logbucket/test-changefeed?endpoint=http://$S3_ENDPOINT/" URI url.URL UseExternalStorage bool // WorkerNums is the num of workers used to sort the log file to sorted file, // will load the file to memory first then write the sorted file to disk // the memory used is WorkerNums * defaultMaxLogSize (64 * megabyte) total WorkerNums int }
LogReaderConfig is the config for LogReader
type RedoLogReader ¶
type RedoLogReader interface { // Run read and decode redo logs in background. Run(ctx context.Context) error // ReadNextRow read one row event from redo logs. ReadNextRow(ctx context.Context) (*model.RowChangedEvent, error) // ReadNextDDL read one ddl event from redo logs. ReadNextDDL(ctx context.Context) (*model.DDLEvent, error) // ReadMeta reads meta from redo logs and returns the latest checkpointTs and resolvedTs ReadMeta(ctx context.Context) (checkpointTs, resolvedTs uint64, err error) }
RedoLogReader is a reader abstraction for redo log storage layer
func NewRedoLogReader ¶
func NewRedoLogReader( ctx context.Context, storageType string, cfg *LogReaderConfig, ) (rd RedoLogReader, err error)
NewRedoLogReader creates a new redo log reader
Click to show internal directories.
Click to hide internal directories.