Documentation ¶
Index ¶
- Variables
- type Checkpoint
- func (*Checkpoint) Descriptor() ([]byte, []int)
- func (m *Checkpoint) GetCheckpointTs() Ts
- func (m *Checkpoint) GetLastSyncedTs() Ts
- func (m *Checkpoint) GetResolvedTs() Ts
- func (m *Checkpoint) Marshal() (dAtA []byte, err error)
- func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error)
- func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Checkpoint) ProtoMessage()
- func (m *Checkpoint) Reset()
- func (m *Checkpoint) Size() (n int)
- func (m *Checkpoint) String() string
- func (m *Checkpoint) Unmarshal(dAtA []byte) error
- func (m *Checkpoint) XXX_DiscardUnknown()
- func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Checkpoint) XXX_Merge(src proto.Message)
- func (m *Checkpoint) XXX_Size() int
- func (m *Checkpoint) XXX_Unmarshal(b []byte) error
- type Key
- type Span
- func (*Span) Descriptor() ([]byte, []int)
- func (s *Span) Eq(b *Span) bool
- func (s *Span) Less(b *Span) bool
- func (m *Span) Marshal() (dAtA []byte, err error)
- func (s *Span) MarshalText() ([]byte, error)
- func (m *Span) MarshalTo(dAtA []byte) (int, error)
- func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Span) ProtoMessage()
- func (m *Span) Reset()
- func (m *Span) Size() (n int)
- func (s *Span) String() string
- func (m *Span) Unmarshal(dAtA []byte) error
- func (m *Span) XXX_DiscardUnknown()
- func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Span) XXX_Merge(src proto.Message)
- func (m *Span) XXX_Size() int
- func (m *Span) XXX_Unmarshal(b []byte) error
- type Stats
- func (*Stats) Descriptor() ([]byte, []int)
- func (m *Stats) GetBarrierTs() Ts
- func (m *Stats) GetCurrentTs() Tsdeprecated
- func (m *Stats) GetRegionCount() uint64
- func (m *Stats) GetStageCheckpoints() map[string]Checkpoint
- func (m *Stats) Marshal() (dAtA []byte, err error)
- func (m *Stats) MarshalTo(dAtA []byte) (int, error)
- func (m *Stats) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Stats) ProtoMessage()
- func (m *Stats) Reset()
- func (m *Stats) Size() (n int)
- func (m *Stats) String() string
- func (m *Stats) Unmarshal(dAtA []byte) error
- func (m *Stats) XXX_DiscardUnknown()
- func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stats) XXX_Merge(src proto.Message)
- func (m *Stats) XXX_Size() int
- func (m *Stats) XXX_Unmarshal(b []byte) error
- type TableID
- type TableState
- type TableStatus
- func (*TableStatus) Descriptor() ([]byte, []int)
- func (m *TableStatus) GetCheckpoint() Checkpoint
- func (m *TableStatus) GetSpan() Span
- func (m *TableStatus) GetState() TableState
- func (m *TableStatus) GetStats() Stats
- func (m *TableStatus) GetTableID() TableID
- func (m *TableStatus) Marshal() (dAtA []byte, err error)
- func (m *TableStatus) MarshalTo(dAtA []byte) (int, error)
- func (m *TableStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TableStatus) ProtoMessage()
- func (m *TableStatus) Reset()
- func (m *TableStatus) Size() (n int)
- func (m *TableStatus) String() string
- func (m *TableStatus) Unmarshal(dAtA []byte) error
- func (m *TableStatus) XXX_DiscardUnknown()
- func (m *TableStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TableStatus) XXX_Merge(src proto.Message)
- func (m *TableStatus) XXX_Size() int
- func (m *TableStatus) XXX_Unmarshal(b []byte) error
- type Ts
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthTable = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTable = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTable = fmt.Errorf("proto: unexpected end of group") )
var TableState_name = map[int32]string{
0: "Unknown",
1: "Absent",
2: "Preparing",
3: "Prepared",
4: "Replicating",
5: "Stopping",
6: "Stopped",
}
var TableState_value = map[string]int32{
"Unknown": 0,
"Absent": 1,
"Preparing": 2,
"Prepared": 3,
"Replicating": 4,
"Stopping": 5,
"Stopped": 6,
}
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶
type Checkpoint struct { CheckpointTs Ts `protobuf:"varint,1,opt,name=checkpoint_ts,json=checkpointTs,proto3,casttype=Ts" json:"checkpoint_ts,omitempty"` ResolvedTs Ts `protobuf:"varint,2,opt,name=resolved_ts,json=resolvedTs,proto3,casttype=Ts" json:"resolved_ts,omitempty"` LastSyncedTs Ts `protobuf:"varint,3,opt,name=last_synced_ts,json=lastSyncedTs,proto3,casttype=Ts" json:"last_synced_ts,omitempty"` }
func (*Checkpoint) Descriptor ¶
func (*Checkpoint) Descriptor() ([]byte, []int)
func (*Checkpoint) GetCheckpointTs ¶
func (m *Checkpoint) GetCheckpointTs() Ts
func (*Checkpoint) GetLastSyncedTs ¶
func (m *Checkpoint) GetLastSyncedTs() Ts
func (*Checkpoint) GetResolvedTs ¶
func (m *Checkpoint) GetResolvedTs() Ts
func (*Checkpoint) Marshal ¶
func (m *Checkpoint) Marshal() (dAtA []byte, err error)
func (*Checkpoint) MarshalToSizedBuffer ¶
func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Checkpoint) ProtoMessage ¶
func (*Checkpoint) ProtoMessage()
func (*Checkpoint) Reset ¶
func (m *Checkpoint) Reset()
func (*Checkpoint) Size ¶
func (m *Checkpoint) Size() (n int)
func (*Checkpoint) String ¶
func (m *Checkpoint) String() string
func (*Checkpoint) Unmarshal ¶
func (m *Checkpoint) Unmarshal(dAtA []byte) error
func (*Checkpoint) XXX_DiscardUnknown ¶
func (m *Checkpoint) XXX_DiscardUnknown()
func (*Checkpoint) XXX_Marshal ¶
func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Checkpoint) XXX_Merge ¶
func (m *Checkpoint) XXX_Merge(src proto.Message)
func (*Checkpoint) XXX_Size ¶
func (m *Checkpoint) XXX_Size() int
func (*Checkpoint) XXX_Unmarshal ¶
func (m *Checkpoint) XXX_Unmarshal(b []byte) error
type Key ¶
type Key []byte
Key is a custom type for bytes encoded in memcomparable format. Key is read-only, must not be mutated.
func (Key) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It is helpful to format span in log.
type Span ¶
type Span struct { TableID TableID `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3,casttype=TableID" json:"table_id,omitempty"` StartKey Key `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3,casttype=Key" json:"start_key,omitempty"` EndKey Key `protobuf:"bytes,3,opt,name=end_key,json=endKey,proto3,casttype=Key" json:"end_key,omitempty"` }
Span is a full extent of key space from an inclusive start_key to an exclusive end_key.
func (*Span) Descriptor ¶
func (*Span) MarshalText ¶
MarshalText implements encoding.TextMarshaler (used in proto.CompactTextString). It is helpful to format span in log.
func (*Span) ProtoMessage ¶
func (*Span) ProtoMessage()
func (*Span) XXX_DiscardUnknown ¶
func (m *Span) XXX_DiscardUnknown()
func (*Span) XXX_Unmarshal ¶
type Stats ¶
type Stats struct { // Number of captured regions. RegionCount uint64 `protobuf:"varint,1,opt,name=region_count,json=regionCount,proto3" json:"region_count,omitempty"` // The current timestamp from the table's point of view. CurrentTs Ts `protobuf:"varint,2,opt,name=current_ts,json=currentTs,proto3,casttype=Ts" json:"current_ts,omitempty"` // Deprecated: Do not use. // Checkponits at each stage. StageCheckpoints map[string]Checkpoint `` /* 187-byte string literal not displayed */ // The barrier timestamp of the table. BarrierTs Ts `protobuf:"varint,4,opt,name=barrier_ts,json=barrierTs,proto3,casttype=Ts" json:"barrier_ts,omitempty"` }
Stats holds a statistic for a table.
func (*Stats) Descriptor ¶
func (*Stats) GetBarrierTs ¶
func (*Stats) GetCurrentTs
deprecated
func (*Stats) GetRegionCount ¶
func (*Stats) GetStageCheckpoints ¶
func (m *Stats) GetStageCheckpoints() map[string]Checkpoint
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()
func (*Stats) XXX_DiscardUnknown ¶
func (m *Stats) XXX_DiscardUnknown()
func (*Stats) XXX_Marshal ¶
func (*Stats) XXX_Unmarshal ¶
type TableState ¶
type TableState int32
TableState is the state of table replication in processor.
┌────────┐ ┌───────────┐ ┌──────────┐ │ Absent ├─> │ Preparing ├─> │ Prepared │ └────────┘ └───────────┘ └─────┬────┘ v ┌─────────┐ ┌──────────┐ ┌─────────────┐ │ Stopped │ <─┤ Stopping │ <─┤ Replicating │ └─────────┘ └──────────┘ └─────────────┘
TODO rename to TableSpanState.
const ( TableStateUnknown TableState = 0 TableStateAbsent TableState = 1 TableStatePreparing TableState = 2 TableStatePrepared TableState = 3 TableStateReplicating TableState = 4 TableStateStopping TableState = 5 TableStateStopped TableState = 6 )
func (*TableState) CompareAndSwap ¶
func (s *TableState) CompareAndSwap(old, new TableState) bool
CompareAndSwap is just like sync/atomic.Atomic*.CompareAndSwap.
func (TableState) EnumDescriptor ¶
func (TableState) EnumDescriptor() ([]byte, []int)
func (*TableState) Store ¶
func (s *TableState) Store(new TableState)
Store TableState with THREAD-SAFE
func (TableState) String ¶
func (x TableState) String() string
type TableStatus ¶
type TableStatus struct { TableID TableID `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3,casttype=TableID" json:"table_id,omitempty"` Span Span `protobuf:"bytes,5,opt,name=span,proto3" json:"span"` State TableState `protobuf:"varint,2,opt,name=state,proto3,enum=pingcap.tiflow.cdc.processor.tablepb.TableState" json:"state,omitempty"` Checkpoint Checkpoint `protobuf:"bytes,3,opt,name=checkpoint,proto3" json:"checkpoint"` Stats Stats `protobuf:"bytes,4,opt,name=stats,proto3" json:"stats"` }
TableStatus is the running status of a table. TODO rename to TableStatus.
func (*TableStatus) Descriptor ¶
func (*TableStatus) Descriptor() ([]byte, []int)
func (*TableStatus) GetCheckpoint ¶
func (m *TableStatus) GetCheckpoint() Checkpoint
func (*TableStatus) GetSpan ¶
func (m *TableStatus) GetSpan() Span
func (*TableStatus) GetState ¶
func (m *TableStatus) GetState() TableState
func (*TableStatus) GetStats ¶
func (m *TableStatus) GetStats() Stats
func (*TableStatus) GetTableID ¶
func (m *TableStatus) GetTableID() TableID
func (*TableStatus) Marshal ¶
func (m *TableStatus) Marshal() (dAtA []byte, err error)
func (*TableStatus) MarshalToSizedBuffer ¶
func (m *TableStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TableStatus) ProtoMessage ¶
func (*TableStatus) ProtoMessage()
func (*TableStatus) Reset ¶
func (m *TableStatus) Reset()
func (*TableStatus) Size ¶
func (m *TableStatus) Size() (n int)
func (*TableStatus) String ¶
func (m *TableStatus) String() string
func (*TableStatus) Unmarshal ¶
func (m *TableStatus) Unmarshal(dAtA []byte) error
func (*TableStatus) XXX_DiscardUnknown ¶
func (m *TableStatus) XXX_DiscardUnknown()
func (*TableStatus) XXX_Marshal ¶
func (m *TableStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TableStatus) XXX_Merge ¶
func (m *TableStatus) XXX_Merge(src proto.Message)
func (*TableStatus) XXX_Size ¶
func (m *TableStatus) XXX_Size() int
func (*TableStatus) XXX_Unmarshal ¶
func (m *TableStatus) XXX_Unmarshal(b []byte) error