Documentation
¶
Index ¶
- func NewBatchEncoderBuilder(config *common.Config, clusterID string) codec.RowEventEncoderBuilder
- func NewDecoder(config *common.Config, db *sql.DB) codec.RowEventDecoder
- type BatchEncoder
- func (d *BatchEncoder) AppendRowChangedEvent(_ context.Context, _ string, e *model.RowChangedEvent, callback func()) error
- func (d *BatchEncoder) Build() []*common.Message
- func (d *BatchEncoder) EncodeCheckpointEvent(ts uint64) (*common.Message, error)
- func (d *BatchEncoder) EncodeDDLEvent(e *model.DDLEvent) (*common.Message, error)
- type Decoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBatchEncoderBuilder ¶
func NewBatchEncoderBuilder(config *common.Config, clusterID string) codec.RowEventEncoderBuilder
NewBatchEncoderBuilder creates a Debezium batchEncoderBuilder.
func NewDecoder ¶
NewDecoder return an debezium decoder
Types ¶
type BatchEncoder ¶
type BatchEncoder struct {
// contains filtered or unexported fields
}
BatchEncoder encodes message into Debezium format.
func (*BatchEncoder) AppendRowChangedEvent ¶
func (d *BatchEncoder) AppendRowChangedEvent( _ context.Context, _ string, e *model.RowChangedEvent, callback func(), ) error
AppendRowChangedEvent implements the RowEventEncoder interface
func (*BatchEncoder) Build ¶
func (d *BatchEncoder) Build() []*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 ¶
EncodeDDLEvent implements the RowEventEncoder interface
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder implement the RowEventDecoder interface
func (*Decoder) AddKeyValue ¶
AddKeyValue add the received key and values to the Decoder
func (*Decoder) HasNext ¶
func (d *Decoder) HasNext() (model.MessageType, bool, error)
HasNext returns whether there is any event need to be consumed
func (*Decoder) NextDDLEvent ¶
NextDDLEvent returns the next DDL event if exists
func (*Decoder) NextResolvedEvent ¶
NextResolvedEvent returns the next resolved event if exists
func (*Decoder) NextRowChangedEvent ¶
func (d *Decoder) NextRowChangedEvent() (*model.RowChangedEvent, error)
NextRowChangedEvent returns the next row changed event if exists