Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SyncPointTable is the tale name use to write ts-map when sync-point is enable. SyncPointTable = "syncpoint_v1" // TiCDCSystemSchema is the schema only use by TiCDC. TiCDCSystemSchema = "tidb_cdc" // LightningTaskInfoSchema is the schema only generated by Lightning LightningTaskInfoSchema = "lightning_task_info" )
Variables ¶
This section is empty.
Functions ¶
func IsSchemaDDL ¶
func IsSchemaDDL(actionType timodel.ActionType) bool
IsSchemaDDL returns true if the action type is a schema DDL.
func SupportedEventTypes ¶
SupportedEventTypes returns the supported event types.
func VerifyTableRules ¶
func VerifyTableRules(cfg *config.FilterConfig) (tfilter.Filter, error)
VerifyTableRules checks the table filter rules in the configuration and returns an invalid rule error if the verification fails, otherwise it will return a table filter.
Types ¶
type Filter ¶
type Filter interface { // ShouldIgnoreDMLEvent returns true if the DML event should be ignored. ShouldIgnoreDMLEvent(dml *model.RowChangedEvent, rawRow model.RowChangedDatums, tableInfo *model.TableInfo) (bool, error) // ShouldIgnoreDDLEvent returns true if the DDL event should be ignored. // If a ddl is ignored, it will be applied to cdc's schema storage, // but will not be sent to downstream. ShouldIgnoreDDLEvent(ddl *model.DDLEvent) (bool, error) // ShouldDiscardDDL returns true if this DDL should be discarded. // If a ddl is discarded, it will neither be applied to cdc's schema storage // nor sent to downstream. ShouldDiscardDDL(ddlType timodel.ActionType, schema, table string) bool // ShouldIgnoreTable returns true if the table should be ignored. ShouldIgnoreTable(schema, table string) bool // ShouldIgnoreSchema returns true if the schema should be ignored. ShouldIgnoreSchema(schema string) bool // Verify should only be called by create changefeed OpenAPI. // Its purpose is to verify the expression filter config. Verify(tableInfos []*model.TableInfo) error }
Filter are safe for concurrent use. TODO: find a better way to abstract this interface.
Click to show internal directories.
Click to hide internal directories.