open

package
v0.0.0-...-be15534 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBatchDecoder

func NewBatchDecoder(ctx context.Context, config *common.Config, db *sql.DB) (codec.RowEventDecoder, error)

NewBatchDecoder creates a new BatchDecoder.

func NewBatchEncoder

func NewBatchEncoder(config *common.Config, claimCheck *claimcheck.ClaimCheck) codec.RowEventEncoder

NewBatchEncoder creates a new BatchEncoder.

func NewBatchEncoderBuilder

func NewBatchEncoderBuilder(
	ctx context.Context, config *common.Config,
) (codec.RowEventEncoderBuilder, error)

NewBatchEncoderBuilder creates an open-protocol batchEncoderBuilder.

Types

type BatchDecoder

type BatchDecoder struct {
	// contains filtered or unexported fields
}

BatchDecoder decodes the byte of a batch into the original messages.

func (*BatchDecoder) AddKeyValue

func (b *BatchDecoder) AddKeyValue(key, value []byte) error

AddKeyValue implements the RowEventDecoder interface

func (*BatchDecoder) HasNext

func (b *BatchDecoder) HasNext() (model.MessageType, bool, error)

HasNext implements the RowEventDecoder interface

func (*BatchDecoder) NextDDLEvent

func (b *BatchDecoder) NextDDLEvent() (*model.DDLEvent, error)

NextDDLEvent implements the RowEventDecoder interface

func (*BatchDecoder) NextResolvedEvent

func (b *BatchDecoder) NextResolvedEvent() (uint64, error)

NextResolvedEvent implements the RowEventDecoder interface

func (*BatchDecoder) NextRowChangedEvent

func (b *BatchDecoder) NextRowChangedEvent() (*model.RowChangedEvent, error)

NextRowChangedEvent implements the RowEventDecoder interface

type BatchEncoder

type BatchEncoder struct {
	// contains filtered or unexported fields
}

BatchEncoder encodes the events into the byte of a batch into.

func (*BatchEncoder) AppendRowChangedEvent

func (d *BatchEncoder) AppendRowChangedEvent(
	ctx context.Context,
	_ string,
	e *model.RowChangedEvent,
	callback func(),
) error

AppendRowChangedEvent implements the RowEventEncoder interface

func (*BatchEncoder) Build

func (d *BatchEncoder) Build() (messages []*common.Message)

Build implements the RowEventEncoder interface

func (*BatchEncoder) EncodeCheckpointEvent

func (d *BatchEncoder) EncodeCheckpointEvent(ts uint64) (*common.Message, error)

EncodeCheckpointEvent implements the RowEventEncoder interface

func (*BatchEncoder) EncodeDDLEvent

func (d *BatchEncoder) EncodeDDLEvent(e *model.DDLEvent) (*common.Message, error)

EncodeDDLEvent implements the RowEventEncoder interface

Jump to

Keyboard shortcuts

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