Documentation
¶
Index ¶
- type CDCQuerier
- func (q *CDCQuerier) GetChanges(ctx context.Context, captureInstance string, tableName string, fromLSN []byte, ...) ([]cdc.Change, error)
- func (q *CDCQuerier) GetMaxLSN(ctx context.Context) ([]byte, error)
- func (q *CDCQuerier) GetMinLSN(ctx context.Context, captureInstance string) ([]byte, error)
- func (q *CDCQuerier) IncrementLSN(ctx context.Context, lsn []byte) ([]byte, error)
- type Driver
- type MockHandler
- type MockRow
- type TableData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CDCQuerier ¶
type CDCQuerier struct {
// contains filtered or unexported fields
}
CDCQuerier implements core.CDCQuerier interface using mock data
func NewCDCQuerier ¶
func NewCDCQuerier(handler *MockHandler) *CDCQuerier
NewCDCQuerier creates a new mock CDCQuerier
func (*CDCQuerier) GetChanges ¶
func (q *CDCQuerier) GetChanges(ctx context.Context, captureInstance string, tableName string, fromLSN []byte, toLSN []byte) ([]cdc.Change, error)
GetChanges queries CDC changes for a table
func (*CDCQuerier) GetMaxLSN ¶
func (q *CDCQuerier) GetMaxLSN(ctx context.Context) ([]byte, error)
GetMaxLSN returns the current max LSN
func (*CDCQuerier) IncrementLSN ¶
IncrementLSN returns the next LSN after the given one
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements database/sql/driver.Driver
type MockHandler ¶
type MockHandler struct {
Tables map[string]*TableData
MaxLSN []byte
CurrentLSN []byte
QueryResults map[string][]MockRow
}
MockHandler holds mock data and state
func HandlerForTest ¶
func HandlerForTest() *MockHandler
HandlerForTest returns the mock handler for testing purposes
Click to show internal directories.
Click to hide internal directories.