Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusTxInfoUnprocessed = 1 StatusTxInfoProcessed = 2 )
Variables ¶
This section is empty.
Functions ¶
func BatchInsertTxInfo ¶
func InsertBinlogEvents ¶
func InsertBinlogEvents(binlogEvents []ChBinlogEvent) error
func InsertTxInfo ¶
Types ¶
type AuditLog ¶
type AuditLog struct {
Time time.Time `ch:"time"`
Context string `ch:"context"`
GTID string `ch:"gtid"`
BinlogEvents []ChBinlogEvent
}
func NewAuditLog ¶
func NewAuditLog(txInfo ChTxInfo, events []ChBinlogEvent) *AuditLog
type BinlogEvent ¶
type BinlogEvent struct {
Db string `json:"db"`
Table string `json:"table"`
Action Action `json:"action"`
GTID string `json:"gtid"`
Time int64 `json:"time"`
Data sql.RawBytes `json:"data"`
}
func NewBinlogEvent ¶
func NewBinlogEvent(event *river.EventData) (*BinlogEvent, error)
func (*BinlogEvent) ChEvent ¶
func (e *BinlogEvent) ChEvent() ChBinlogEvent
func (*BinlogEvent) Marshal ¶
func (e *BinlogEvent) Marshal() ([]byte, error)
type ChBinlogEvent ¶
type ChBinlogEvent struct {
Db string `ch:"db"`
Table string `ch:"table"`
Action int32 `ch:"action"`
GTID string `ch:"gtid"`
Data string `ch:"data"`
}
func ListBinlogEvent ¶
func ListBinlogEvent(gtid string) ([]ChBinlogEvent, error)
func ListBinlogEvents ¶
func ListBinlogEvents(gtidList []string) ([]ChBinlogEvent, error)
type ChTxInfo ¶
type ChTxInfo struct {
Time time.Time `json:"time" ch:"time"`
Context string `json:"context" ch:"context"`
GTID string `json:"gtid" ch:"gtid"`
Status uint8 `json:"-" ch:"-"`
}
func ListUnprocessedTxInfo ¶
type FormatData ¶
Click to show internal directories.
Click to hide internal directories.