Documentation ¶
Index ¶
Constants ¶
const ( BL_UNRECOGNIZED = iota BL_BEGIN BL_COMMIT BL_ROLLBACK BL_DML BL_DDL BL_SET )
Valid statement types in the binlogs.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinlogTransaction ¶
BinlogTransaction represents one transaction as read from the binlog. Timestamp is set if the first statement was something like 'SET TIMESTAMP=...'
func (*BinlogTransaction) MarshalBson ¶
func (binlogTransaction *BinlogTransaction) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes BinlogTransaction.
func (*BinlogTransaction) UnmarshalBson ¶
func (binlogTransaction *BinlogTransaction) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into BinlogTransaction.
type BlpPosition ¶
BlpPosition describes a binlog player position to start from.
func (*BlpPosition) MarshalBson ¶
func (blpPosition *BlpPosition) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes BlpPosition.
func (*BlpPosition) UnmarshalBson ¶
func (blpPosition *BlpPosition) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into BlpPosition.
type BlpPositionList ¶
type BlpPositionList struct {
Entries []BlpPosition
}
BlpPositionList is a list of BlpPosition, not sorted.
func (*BlpPositionList) FindBlpPositionById ¶
func (bpl *BlpPositionList) FindBlpPositionById(id uint32) (*BlpPosition, error)
FindBlpPositionById returns the BlpPosition with the given id, or error
func (*BlpPositionList) MarshalBson ¶
func (blpPositionList *BlpPositionList) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes BlpPositionList.
func (*BlpPositionList) UnmarshalBson ¶
func (blpPositionList *BlpPositionList) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into BlpPositionList.
type KeyRangeRequest ¶
type KeyRangeRequest struct { GroupId int64 KeyspaceIdType key.KeyspaceIdType KeyRange key.KeyRange }
KeyRangeRequest is used to make a request for StreamKeyRange.
type Statement ¶
Statement represents one statement as read from the binlog.
func (*Statement) MarshalBson ¶
func (statement *Statement) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes Statement.
type StreamEvent ¶
type StreamEvent struct { // Category can be "DML", "DDL", "ERR" or "POS" Category string // DML TableName string PKColNames []string PKValues [][]interface{} // DDL or ERR Sql string // Timestamp is set for DML, DDL or ERR Timestamp int64 // POS GroupId int64 }
StreamEvent represents one event for the update stream.
func (*StreamEvent) MarshalBson ¶
func (streamEvent *StreamEvent) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes StreamEvent.
func (*StreamEvent) UnmarshalBson ¶
func (streamEvent *StreamEvent) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into StreamEvent.
type TablesRequest ¶
TablesRequest is used to make a request for StreamTables.
type UpdateStreamRequest ¶
type UpdateStreamRequest struct {
GroupId int64
}
UpdateStreamRequest is used to make a request for ServeUpdateStream.