Versions in this module Expand all Collapse all v0 v0.2.1 Dec 17, 2020 v0.2.0 Dec 16, 2020 v0.1.0 Dec 8, 2020 Changes in this version + const BeginMsgType + const CommitMsgType + const DeleteMsgType + const InsertMsgType + const NewTupleDataType + const NullDataType + const OriginMsgType + const RelationMsgType + const TextDataType + const ToastDataType + const TypeMsgType + const UpdateMsgType + var ErrEmptyMessage = errors.New("empty WAL message") + var ErrMessageLost = errors.New("messages are lost") + var ErrUnknownMessageType = errors.New("unknown message type") + type ActionData struct + Columns []Column + Kind ActionKind + Schema string + Table string + type ActionKind string + const ActionKindDelete + const ActionKindInsert + const ActionKindUpdate + type Begin struct + LSN int64 + Timestamp time.Time + XID int32 + type BinaryParser struct + func NewBinaryParser(byteOrder binary.ByteOrder) *BinaryParser + func (p *BinaryParser) ParseMessage(msg []byte, tx *Transaction) error + type Column struct + func (c *Column) AssertValue(src []byte) + type Commit struct + Flags int8 + LSN int64 + Timestamp time.Time + TransactionLSN int64 + type DataType struct + ID int32 + Name string + Namespace string + type Delete struct + KeyTuple bool + OldTuple bool + RelationID int32 + Row []TupleData + type Insert struct + NewTuple bool + RelationID int32 + Row []TupleData + type Origin struct + LSN int64 + Name string + type Parser interface + ParseMessage func([]byte, *Transaction) error + type Relation struct + Columns []RelationColumn + ID int32 + Name string + Namespace string + Replica int8 + type RelationColumn struct + Key bool + ModifierType int32 + Name string + TypeID int32 + type RelationData struct + Columns []Column + Schema string + Table string + type Transaction struct + Actions []ActionData + BeginTime *time.Time + CommitTime *time.Time + LSN int64 + RelationStore map[int32]RelationData + func NewTransaction() *Transaction + func (w *Transaction) Clear() + func (w *Transaction) CreateEventsWithFilter(tableMap map[string][]string) []event.Event + func (w Transaction) CreateActionData(relationID int32, rows []TupleData, kind ActionKind) (a ActionData, err error) + type TupleData struct + Value []byte + type Update struct + KeyTuple bool + NewTuple bool + OldRow []TupleData + OldTuple bool + RelationID int32 + Row []TupleData