# Packages
No description provided by the author
# Functions
AddExtraColumnInfo is used to add some extra column info to the table info.
BuildTableInfo builds a table info from given information.
BuildTableInfoWithPKNames4Test builds a table info from given information.
BuildTiDBTableInfo is a simple wrapper over BuildTiDBTableInfoImpl which create a default ColumnIDAllocator.
BuildTiDBTableInfoImpl builds a TiDB TableInfo from given information.
BuildTiDBTableInfoWithoutVirtualColumns build a TableInfo without virual columns from the source table info.
ChangeFeedID4Test returns `ChangefeedID` with given namespace and id.
Columns2ColumnDatas convert `Column`s to `ColumnData`s.
ColumnValueString returns the string representation of the column value.
ComparePolymorphicEvents compares two events by CRTs, Resolved, StartTs, Delete/Put order.
DefaultChangeFeedID returns `ChangeFeedID` with default namespace.
GetColumnDefaultValue returns the default definition of a column.
GetHandleAndUniqueIndexOffsets4Test is used to get the offsets of handle columns and other unique index columns in test.
IsColCDCVisible returns whether the col is visible for CDC.
ListVersionsFromCaptureInfos returns the version list of the CaptureInfo list.
NewBootstrapDDLEvent returns a bootstrap DDL event.
NewEmptyPolymorphicEvent creates a new empty PolymorphicEvent.
NewHTTPError wrap a err into HTTPError.
NewIncrementalColumnIDAllocator creates a new IncrementalColumnIDAllocator.
NewNameBasedColumnIDAllocator creates a new NameBasedColumnIDAllocator.
NewPolymorphicEvent creates a new PolymorphicEvent with a raw KV.
NewResolvedPolymorphicEvent creates a new PolymorphicEvent with the resolved ts.
NewResolvedTs creates a normal ResolvedTs.
ShouldSplitUpdateEvent determines if the split event is needed to align the old format based on whether the handle key column or unique key has been modified.
SplitUpdateEvent splits an update event into a delete and an insert event.
SplitUpdateKVEntry splits the raw kv entry into a delete entry and an insert entry.
ValidateChangefeedID returns true if the changefeed ID matches the pattern "^[a-zA-Z0-9]+(\-[a-zA-Z0-9]+)*$", length no more than "changeFeedIDMaxLen", eg, "simple-changefeed-task".
ValidateNamespace returns true if the namespace matches the pattern "^[a-zA-Z0-9]+(\-[a-zA-Z0-9]+)*$", length no more than "changeFeedIDMaxLen", eg, "simple-changefeed-task".
WrapTableInfo creates a TableInfo from a timodel.TableInfo.
# Constants
All AdminJob types.
All AdminJob types.
All AdminJob types.
All AdminJob types.
All AdminJob types.
BatchResolvedMode means that all events whose commitTs is less than 'resolved.Ts' are sent to Sink.
BinaryFlag means the column charset is binary.
DefaultNamespace is the default namespace value, all the old changefeed will be put into default namespace.
GeneratedColumnFlag means the column is a generated column.
HandleIndexPKIsHandle represents that the handle index is the pk and the pk is the handle.
HandleIndexTableIneligible represents that the table is ineligible.
HandleKeyFlag means the column is selected as the handle key The handleKey is chosen by the following rules in the order: 1.
LivenessCaptureAlive means the capture is alive, and ready to serve.
LivenessCaptureStopping means the capture is in the process of graceful shutdown.
MessageTypeDDL is ddl type of message key.
MessageTypeResolved is resolved type of message key.
MessageTypeRow is row type of message key.
MessageTypeUnknown is unknown type of message key.
MultipleKeyFlag means the column is multiple key.
NormalResolvedMode means that all events whose commitTs is less than or equal to `resolved.Ts` are sent to Sink.
NullableFlag means the column is nullable.
All TableOperation status.
All TableOperation status.
Move means after the delete operation, the table will be re added.
All TableOperation status.
OpType for kv.
OpType for kv.
OpType for kv.
OpType for kv.
PrimaryKeyFlag means the column is primary key.
RedoLogTypeDDL is ddl type of log.
RedoLogTypeRow is row type of log.
RedoLogTypeUnknown is unknown type of log.
sort engines.
sort engines.
sort engines.
All FeedStates Only `StateNormal` and `StatePending` changefeed is running, others are stopped.
All FeedStates Only `StateNormal` and `StatePending` changefeed is running, others are stopped.
All FeedStates Only `StateNormal` and `StatePending` changefeed is running, others are stopped.
All FeedStates Only `StateNormal` and `StatePending` changefeed is running, others are stopped.
All FeedStates Only `StateNormal` and `StatePending` changefeed is running, others are stopped.
All FeedStates Only `StateNormal` and `StatePending` changefeed is running, others are stopped.
StateUnInitialized is used for the changefeed that has not been initialized it only exists in memory for a short time and will not be persisted to storage.
All FeedStates Only `StateNormal` and `StatePending` changefeed is running, others are stopped.
UniqueKeyFlag means the column is unique key.
UnsignedFlag means the column stores an unsigned integer.
# Structs
AdminJob holds an admin job.
Capture holds common information of a capture in cdc.
CaptureInfo store in etcd.
CaptureTaskStatus holds TaskStatus of a capture.
ChangefeedCommonInfo holds some common usage information of a changefeed.
ChangefeedConfig use to create a changefeed.
ChangefeedDetail holds detail info of a changefeed.
ChangeFeedID is the type for change feed ID.
ChangeFeedInfo describes the detail of a ChangeFeed.
ChangeFeedStatus stores information about a ChangeFeed It is stored in etcd.
ChangeFeedStatusForAPI uses to transfer the status of changefeed for API.
ChangeFeedSyncedStatusForAPI uses to transfer the synced status of changefeed for API.
Column represents a column value and its schema info.
ColumnData represents a column value in row changed event.
DDLEvent stores DDL event.
DDLJobEntry is the DDL job entry.
DrainCaptureRequest is request for manual `DrainCapture`.
DrainCaptureResp is response for manual `DrainCapture`.
HTTPError of cdc http api.
IncrementalColumnIDAllocator allocates column id in an incremental way.
MoveTableReq is the request for `MoveTable`.
NameBasedColumnIDAllocator allocates column id using an prefined map from column name to id
msgp:ignore NameBasedColumnIDAllocator.
PolymorphicEvent describes an event can be in multiple states.
ProcessorCommonInfo holds the common info of a processor.
ProcessorDetail holds the detail info of a processor.
ProcInfoSnap holds most important replication information of a processor.
RawKVEntry notify the KV operator.
RedoColumn stores Column change.
RedoDDLEvent represents DDL event used in redo log persistent.
RedoLog defines the persistent structure of redo log since MsgPack do not support types that are defined in another package, more info https://github.com/tinylib/msgp/issues/158, https://github.com/tinylib/msgp/issues/149 so define a RedoColumn, RedoDDLEvent instead of using the Column, DDLEvent.
RedoRowChangedEvent represents the DML event used in RedoLog.
RegionComparableSpan contains a comparable span and a region id of that span
msgp:ignore RegionComparableSpan.
RegionFeedEvent from the kv layer.
ResolvedSpans guarantees all the KV value event with commit ts less than ResolvedTs has been emitted.
ResolvedTs is the resolved timestamp of sink module.
RowChangedDatums is used to store the changed datums of a row.
RowChangedEvent represents a row changed event
msgp:ignore RowChangedEvent.
RowChangedEventInRedoLog is used to store RowChangedEvent in redo log v2 format.
RunningError represents some running error from cdc components, such as processor.
ServerStatus holds some common information of a server.
SingleTableTxn represents a transaction which includes many row events in a single table
msgp:ignore SingleTableTxn.
TableInfo provides meta data describing a DB table.
TableName represents name of a table, includes table name and schema name.
TableOperation records the current information of a table migration.
TableReplicaInfo records the table replica info.
TaskPosition records the process information of a capture.
TaskStatus records the task information of a capture.
TopicPartitionKey contains the topic and partition key of the message.
UpstreamInfo store in etcd.
# Interfaces
ColumnIDAllocator represents the interface to allocate column id for tableInfo.
# Type aliases
AdminJobType represents for admin job type, both used in owner and processor.
CaptureID is the type for capture ID.
ColumnFlagType is for encapsulating the flag operations for different flags.
FeedState represents the running state of a changefeed.
JSONTime used to wrap time into json format.
Liveness is the liveness status of a capture.
MessageType is the type of message, which is used by MqSink and RedoLog.
OpType for the kv, delete or put.
ProcessorsInfos maps from capture IDs to TaskStatus.
RedoLogType is the type of log.
ResolvedMode describes the batch type of a resolved event.
ShouldSplitKVEntry checks whether the raw kv entry should be splitted.
SortEngine is the sorter engine.
TableID is the ID of the table.
Ts is the timestamp with a logical count.
UpstreamID is the type for upstream ID.