Documentation ¶
Index ¶
- Variables
- type DataType
- type EventType
- type KeySchema
- func (*KeySchema) Descriptor() ([]byte, []int)
- func (m *KeySchema) GetExtraCols() []*KeySchema_ColumnInfo
- func (m *KeySchema) GetKeyCols() []*KeySchema_ColumnInfo
- func (m *KeySchema) GetUniqueIndex() bool
- func (m *KeySchema) Marshal() (dAtA []byte, err error)
- func (m *KeySchema) MarshalTo(dAtA []byte) (int, error)
- func (m *KeySchema) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*KeySchema) ProtoMessage()
- func (m *KeySchema) Reset()
- func (m *KeySchema) Size() (n int)
- func (m *KeySchema) String() string
- func (m *KeySchema) Unmarshal(dAtA []byte) error
- func (m *KeySchema) XXX_DiscardUnknown()
- func (m *KeySchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KeySchema) XXX_Merge(src proto.Message)
- func (m *KeySchema) XXX_Size() int
- func (m *KeySchema) XXX_Unmarshal(b []byte) error
- type KeySchema_ColumnInfo
- func (*KeySchema_ColumnInfo) Descriptor() ([]byte, []int)
- func (m *KeySchema_ColumnInfo) GetId() int32
- func (m *KeySchema_ColumnInfo) GetType() DataType
- func (m *KeySchema_ColumnInfo) GetUnsigned() bool
- func (m *KeySchema_ColumnInfo) Marshal() (dAtA []byte, err error)
- func (m *KeySchema_ColumnInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *KeySchema_ColumnInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*KeySchema_ColumnInfo) ProtoMessage()
- func (m *KeySchema_ColumnInfo) Reset()
- func (m *KeySchema_ColumnInfo) Size() (n int)
- func (m *KeySchema_ColumnInfo) String() string
- func (m *KeySchema_ColumnInfo) Unmarshal(dAtA []byte) error
- func (m *KeySchema_ColumnInfo) XXX_DiscardUnknown()
- func (m *KeySchema_ColumnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KeySchema_ColumnInfo) XXX_Merge(src proto.Message)
- func (m *KeySchema_ColumnInfo) XXX_Size() int
- func (m *KeySchema_ColumnInfo) XXX_Unmarshal(b []byte) error
- type Leader
- func (*Leader) Descriptor() ([]byte, []int)
- func (m *Leader) GetNodeAddr() string
- func (m *Leader) GetNodeId() uint64
- func (m *Leader) GetRangeId() uint64
- func (m *Leader) Marshal() (dAtA []byte, err error)
- func (m *Leader) MarshalTo(dAtA []byte) (int, error)
- func (m *Leader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Leader) ProtoMessage()
- func (m *Leader) Reset()
- func (m *Leader) Size() (n int)
- func (m *Leader) String() string
- func (m *Leader) Unmarshal(dAtA []byte) error
- func (m *Leader) XXX_DiscardUnknown()
- func (m *Leader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Leader) XXX_Merge(src proto.Message)
- func (m *Leader) XXX_Size() int
- func (m *Leader) XXX_Unmarshal(b []byte) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetAdminPort() uint32
- func (m *Node) GetId() uint64
- func (m *Node) GetIp() string
- func (m *Node) GetLastUpdateTime() int64
- func (m *Node) GetRaftPort() uint32
- func (m *Node) GetRangePeers() []*RangePeer
- func (m *Node) GetServerPort() uint32
- func (m *Node) GetState() NodeState
- func (m *Node) GetType() StoreType
- func (m *Node) GetVersion() int64
- func (m *Node) Marshal() (dAtA []byte, err error)
- func (m *Node) MarshalTo(dAtA []byte) (int, error)
- func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) Size() (n int)
- func (m *Node) String() string
- func (m *Node) Unmarshal(dAtA []byte) error
- func (m *Node) XXX_DiscardUnknown()
- func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Node) XXX_Merge(src proto.Message)
- func (m *Node) XXX_Size() int
- func (m *Node) XXX_Unmarshal(b []byte) error
- type NodeState
- type Peer
- func (*Peer) Descriptor() ([]byte, []int)
- func (m *Peer) GetId() uint64
- func (m *Peer) GetNodeId() uint64
- func (m *Peer) GetType() PeerType
- func (m *Peer) Marshal() (dAtA []byte, err error)
- func (m *Peer) MarshalTo(dAtA []byte) (int, error)
- func (m *Peer) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Peer) ProtoMessage()
- func (m *Peer) Reset()
- func (m *Peer) Size() (n int)
- func (m *Peer) String() string
- func (m *Peer) Unmarshal(dAtA []byte) error
- func (m *Peer) XXX_DiscardUnknown()
- func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Peer) XXX_Merge(src proto.Message)
- func (m *Peer) XXX_Size() int
- func (m *Peer) XXX_Unmarshal(b []byte) error
- type PeerStatus
- func (*PeerStatus) Descriptor() ([]byte, []int)
- func (m *PeerStatus) GetApplied() uint64
- func (m *PeerStatus) GetCommit() uint64
- func (m *PeerStatus) GetDownSeconds() uint64
- func (m *PeerStatus) GetIndex() uint64
- func (m *PeerStatus) GetPeer() *Peer
- func (m *PeerStatus) GetSnapshotting() bool
- func (m *PeerStatus) Marshal() (dAtA []byte, err error)
- func (m *PeerStatus) MarshalTo(dAtA []byte) (int, error)
- func (m *PeerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PeerStatus) ProtoMessage()
- func (m *PeerStatus) Reset()
- func (m *PeerStatus) Size() (n int)
- func (m *PeerStatus) String() string
- func (m *PeerStatus) Unmarshal(dAtA []byte) error
- func (m *PeerStatus) XXX_DiscardUnknown()
- func (m *PeerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PeerStatus) XXX_Merge(src proto.Message)
- func (m *PeerStatus) XXX_Size() int
- func (m *PeerStatus) XXX_Unmarshal(b []byte) error
- type PeerType
- type Range
- func (*Range) Descriptor() ([]byte, []int)
- func (m *Range) GetDbId() int32
- func (m *Range) GetEndKey() []byte
- func (m *Range) GetId() uint64
- func (m *Range) GetIndexId() int32
- func (m *Range) GetKeySchema() *KeySchema
- func (m *Range) GetLeader() uint64
- func (m *Range) GetParentRangeId() uint64
- func (m *Range) GetPeers() []*Peer
- func (m *Range) GetRangeEpoch() *RangeEpoch
- func (m *Range) GetRangeType() RangeType
- func (m *Range) GetStartKey() []byte
- func (m *Range) GetStoreType() StoreType
- func (m *Range) GetTableId() int32
- func (m *Range) GetTerm() uint64
- func (m *Range) Marshal() (dAtA []byte, err error)
- func (m *Range) MarshalTo(dAtA []byte) (int, error)
- func (m *Range) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Range) ProtoMessage()
- func (m *Range) Reset()
- func (m *Range) Size() (n int)
- func (m *Range) String() string
- func (m *Range) Unmarshal(dAtA []byte) error
- func (m *Range) XXX_DiscardUnknown()
- func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Range) XXX_Merge(src proto.Message)
- func (m *Range) XXX_Size() int
- func (m *Range) XXX_Unmarshal(b []byte) error
- type RangeEpoch
- func (*RangeEpoch) Descriptor() ([]byte, []int)
- func (m *RangeEpoch) GetConfVer() uint64
- func (m *RangeEpoch) GetVersion() uint64
- func (m *RangeEpoch) Marshal() (dAtA []byte, err error)
- func (m *RangeEpoch) MarshalTo(dAtA []byte) (int, error)
- func (m *RangeEpoch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RangeEpoch) ProtoMessage()
- func (m *RangeEpoch) Reset()
- func (m *RangeEpoch) Size() (n int)
- func (m *RangeEpoch) String() string
- func (m *RangeEpoch) Unmarshal(dAtA []byte) error
- func (m *RangeEpoch) XXX_DiscardUnknown()
- func (m *RangeEpoch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RangeEpoch) XXX_Merge(src proto.Message)
- func (m *RangeEpoch) XXX_Size() int
- func (m *RangeEpoch) XXX_Unmarshal(b []byte) error
- type RangePeer
- func (*RangePeer) Descriptor() ([]byte, []int)
- func (m *RangePeer) GetPeerId() uint64
- func (m *RangePeer) GetRangeId() uint64
- func (m *RangePeer) GetState() RangePeerState
- func (m *RangePeer) Marshal() (dAtA []byte, err error)
- func (m *RangePeer) MarshalTo(dAtA []byte) (int, error)
- func (m *RangePeer) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RangePeer) ProtoMessage()
- func (m *RangePeer) Reset()
- func (m *RangePeer) Size() (n int)
- func (m *RangePeer) String() string
- func (m *RangePeer) Unmarshal(dAtA []byte) error
- func (m *RangePeer) XXX_DiscardUnknown()
- func (m *RangePeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RangePeer) XXX_Merge(src proto.Message)
- func (m *RangePeer) XXX_Size() int
- func (m *RangePeer) XXX_Unmarshal(b []byte) error
- type RangePeerState
- type RangeType
- type Replica
- func (*Replica) Descriptor() ([]byte, []int)
- func (m *Replica) GetEndKey() []byte
- func (m *Replica) GetPeer() *Peer
- func (m *Replica) GetRangeId() uint64
- func (m *Replica) GetStartKey() []byte
- func (m *Replica) Marshal() (dAtA []byte, err error)
- func (m *Replica) MarshalTo(dAtA []byte) (int, error)
- func (m *Replica) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Replica) ProtoMessage()
- func (m *Replica) Reset()
- func (m *Replica) Size() (n int)
- func (m *Replica) String() string
- func (m *Replica) Unmarshal(dAtA []byte) error
- func (m *Replica) XXX_DiscardUnknown()
- func (m *Replica) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Replica) XXX_Merge(src proto.Message)
- func (m *Replica) XXX_Size() int
- func (m *Replica) XXX_Unmarshal(b []byte) error
- type StoreType
- type WatcherEvent
- func (*WatcherEvent) Descriptor() ([]byte, []int)
- func (m *WatcherEvent) GetDbId() int32
- func (m *WatcherEvent) GetEventType() EventType
- func (m *WatcherEvent) GetNodeId() uint64
- func (m *WatcherEvent) GetRangeId() uint64
- func (m *WatcherEvent) GetTableId() int32
- func (m *WatcherEvent) GetValue() []byte
- func (m *WatcherEvent) GetVersion() uint64
- func (m *WatcherEvent) GetWatcherType() WatcherType
- func (m *WatcherEvent) Marshal() (dAtA []byte, err error)
- func (m *WatcherEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *WatcherEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WatcherEvent) ProtoMessage()
- func (m *WatcherEvent) Reset()
- func (m *WatcherEvent) Size() (n int)
- func (m *WatcherEvent) String() string
- func (m *WatcherEvent) Unmarshal(dAtA []byte) error
- func (m *WatcherEvent) XXX_DiscardUnknown()
- func (m *WatcherEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatcherEvent) XXX_Merge(src proto.Message)
- func (m *WatcherEvent) XXX_Size() int
- func (m *WatcherEvent) XXX_Unmarshal(b []byte) error
- type WatcherType
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthBasepb = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBasepb = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBasepb = fmt.Errorf("proto: unexpected end of group") )
var DataType_name = map[int32]string{
0: "Invalid",
1: "TinyInt",
2: "SmallInt",
3: "MediumInt",
4: "Int",
5: "BigInt",
6: "Bit",
10: "Float",
11: "Double",
12: "Decimal",
20: "Date",
21: "TimeStamp",
22: "DateTime",
23: "Time",
24: "Year",
30: "Varchar",
31: "Binary",
32: "Char",
33: "NChar",
34: "Text",
35: "VarBinary",
40: "Json",
50: "Null",
}
var DataType_value = map[string]int32{
"Invalid": 0,
"TinyInt": 1,
"SmallInt": 2,
"MediumInt": 3,
"Int": 4,
"BigInt": 5,
"Bit": 6,
"Float": 10,
"Double": 11,
"Decimal": 12,
"Date": 20,
"TimeStamp": 21,
"DateTime": 22,
"Time": 23,
"Year": 24,
"Varchar": 30,
"Binary": 31,
"Char": 32,
"NChar": 33,
"Text": 34,
"VarBinary": 35,
"Json": 40,
"Null": 50,
}
var EventType_name = map[int32]string{
0: "Event_Type_Invalid",
1: "Event_Type_PUT",
2: "Event_Type_DELETE",
}
var EventType_value = map[string]int32{
"Event_Type_Invalid": 0,
"Event_Type_PUT": 1,
"Event_Type_DELETE": 2,
}
var NodeState_name = map[int32]string{
0: "N_Invalid",
1: "N_Online",
2: "N_Offline",
3: "N_Updating",
4: "N_Offlining",
}
var NodeState_value = map[string]int32{
"N_Invalid": 0,
"N_Online": 1,
"N_Offline": 2,
"N_Updating": 3,
"N_Offlining": 4,
}
var PeerType_name = map[int32]string{
0: "PeerType_Invalid",
1: "PeerType_Normal",
2: "PeerType_Learner",
}
var PeerType_value = map[string]int32{
"PeerType_Invalid": 0,
"PeerType_Normal": 1,
"PeerType_Learner": 2,
}
var RangePeerState_name = map[int32]string{
0: "RPS_Invalid",
1: "RPS_NoLeader",
2: "RPS_Follower",
3: "RPS_Leader",
}
var RangePeerState_value = map[string]int32{
"RPS_Invalid": 0,
"RPS_NoLeader": 1,
"RPS_Follower": 2,
"RPS_Leader": 3,
}
var RangeType_name = map[int32]string{
0: "RNG_Invalid",
1: "RNG_Index",
2: "RNG_Data",
}
var RangeType_value = map[string]int32{
"RNG_Invalid": 0,
"RNG_Index": 1,
"RNG_Data": 2,
}
var StoreType_name = map[int32]string{
0: "Store_Invalid",
1: "Store_Hot",
2: "Store_Warm",
3: "Store_Mix",
}
var StoreType_value = map[string]int32{
"Store_Invalid": 0,
"Store_Hot": 1,
"Store_Warm": 2,
"Store_Mix": 3,
}
var WatcherType_name = map[int32]string{
0: "Watcher_Type_Invalid",
1: "Watcher_Type_Node",
2: "Watcher_Type_Database",
3: "Watcher_Type_Table",
4: "Watcher_Type_Range",
}
var WatcherType_value = map[string]int32{
"Watcher_Type_Invalid": 0,
"Watcher_Type_Node": 1,
"Watcher_Type_Database": 2,
"Watcher_Type_Table": 3,
"Watcher_Type_Range": 4,
}
Functions ¶
This section is empty.
Types ¶
type DataType ¶
type DataType int32
const ( DataType_Invalid DataType = 0 // 8 bit interger DataType_TinyInt DataType = 1 // 16 bit interger DataType_SmallInt DataType = 2 // 24 bit integer DataType_MediumInt DataType = 3 // 32 bit interger DataType_Int DataType = 4 // 64 bit interger DataType_BigInt DataType = 5 DataType_Bit DataType = 6 // 32 bit float DataType_Float DataType = 10 // 64 bit float DataType_Double DataType = 11 DataType_Decimal DataType = 12 DataType_Date DataType = 20 DataType_TimeStamp DataType = 21 DataType_DateTime DataType = 22 DataType_Time DataType = 23 DataType_Year DataType = 24 // string UTF-8 max size 64 KB DataType_Varchar DataType = 30 // Blob max size 64 KB DataType_Binary DataType = 31 DataType_Char DataType = 32 DataType_NChar DataType = 33 DataType_Text DataType = 34 DataType_VarBinary DataType = 35 DataType_Json DataType = 40 DataType_Null DataType = 50 )
func (DataType) EnumDescriptor ¶
type KeySchema ¶
type KeySchema struct { // primarykey columns for data range, or index columns info for index range // order is sensitive for multi cols KeyCols []*KeySchema_ColumnInfo `protobuf:"bytes,1,rep,name=key_cols,json=keyCols,proto3" json:"key_cols,omitempty"` // only valid when range is a index range, to indicate whether index is unique or not UniqueIndex bool `protobuf:"varint,2,opt,name=unique_index,json=uniqueIndex,proto3" json:"unique_index,omitempty"` // only valid when range is a index range, // extra_cols are table's primary key, order is sensitive for multi cols ExtraCols []*KeySchema_ColumnInfo `protobuf:"bytes,3,rep,name=extra_cols,json=extraCols,proto3" json:"extra_cols,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
indicate range key's structure describe how to interpret key bytes, used for dataserver to decode key
func (*KeySchema) Descriptor ¶
func (*KeySchema) GetExtraCols ¶
func (m *KeySchema) GetExtraCols() []*KeySchema_ColumnInfo
func (*KeySchema) GetKeyCols ¶
func (m *KeySchema) GetKeyCols() []*KeySchema_ColumnInfo
func (*KeySchema) GetUniqueIndex ¶
func (*KeySchema) MarshalToSizedBuffer ¶
func (*KeySchema) ProtoMessage ¶
func (*KeySchema) ProtoMessage()
func (*KeySchema) XXX_DiscardUnknown ¶
func (m *KeySchema) XXX_DiscardUnknown()
func (*KeySchema) XXX_Marshal ¶
func (*KeySchema) XXX_Unmarshal ¶
type KeySchema_ColumnInfo ¶
type KeySchema_ColumnInfo struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Type DataType `protobuf:"varint,2,opt,name=type,proto3,enum=basepb.DataType" json:"type,omitempty"` Unsigned bool `protobuf:"varint,3,opt,name=unsigned,proto3" json:"unsigned,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*KeySchema_ColumnInfo) Descriptor ¶
func (*KeySchema_ColumnInfo) Descriptor() ([]byte, []int)
func (*KeySchema_ColumnInfo) GetId ¶
func (m *KeySchema_ColumnInfo) GetId() int32
func (*KeySchema_ColumnInfo) GetType ¶
func (m *KeySchema_ColumnInfo) GetType() DataType
func (*KeySchema_ColumnInfo) GetUnsigned ¶
func (m *KeySchema_ColumnInfo) GetUnsigned() bool
func (*KeySchema_ColumnInfo) Marshal ¶
func (m *KeySchema_ColumnInfo) Marshal() (dAtA []byte, err error)
func (*KeySchema_ColumnInfo) MarshalTo ¶
func (m *KeySchema_ColumnInfo) MarshalTo(dAtA []byte) (int, error)
func (*KeySchema_ColumnInfo) MarshalToSizedBuffer ¶
func (m *KeySchema_ColumnInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*KeySchema_ColumnInfo) ProtoMessage ¶
func (*KeySchema_ColumnInfo) ProtoMessage()
func (*KeySchema_ColumnInfo) Reset ¶
func (m *KeySchema_ColumnInfo) Reset()
func (*KeySchema_ColumnInfo) Size ¶
func (m *KeySchema_ColumnInfo) Size() (n int)
func (*KeySchema_ColumnInfo) String ¶
func (m *KeySchema_ColumnInfo) String() string
func (*KeySchema_ColumnInfo) Unmarshal ¶
func (m *KeySchema_ColumnInfo) Unmarshal(dAtA []byte) error
func (*KeySchema_ColumnInfo) XXX_DiscardUnknown ¶
func (m *KeySchema_ColumnInfo) XXX_DiscardUnknown()
func (*KeySchema_ColumnInfo) XXX_Marshal ¶
func (m *KeySchema_ColumnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*KeySchema_ColumnInfo) XXX_Merge ¶
func (m *KeySchema_ColumnInfo) XXX_Merge(src proto.Message)
func (*KeySchema_ColumnInfo) XXX_Size ¶
func (m *KeySchema_ColumnInfo) XXX_Size() int
func (*KeySchema_ColumnInfo) XXX_Unmarshal ¶
func (m *KeySchema_ColumnInfo) XXX_Unmarshal(b []byte) error
type Leader ¶
type Leader struct { RangeId uint64 `protobuf:"varint,1,opt,name=range_id,json=rangeId,proto3" json:"range_id,omitempty"` NodeId uint64 `protobuf:"varint,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` NodeAddr string `protobuf:"bytes,3,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Leader) Descriptor ¶
func (*Leader) GetNodeAddr ¶
func (*Leader) GetRangeId ¶
func (*Leader) MarshalToSizedBuffer ¶
func (*Leader) ProtoMessage ¶
func (*Leader) ProtoMessage()
func (*Leader) XXX_DiscardUnknown ¶
func (m *Leader) XXX_DiscardUnknown()
func (*Leader) XXX_Marshal ¶
func (*Leader) XXX_Unmarshal ¶
type Node ¶
type Node struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` ServerPort uint32 `protobuf:"varint,3,opt,name=server_port,json=serverPort,proto3" json:"server_port,omitempty"` RaftPort uint32 `protobuf:"varint,4,opt,name=raft_port,json=raftPort,proto3" json:"raft_port,omitempty"` AdminPort uint32 `protobuf:"varint,5,opt,name=admin_port,json=adminPort,proto3" json:"admin_port,omitempty"` State NodeState `protobuf:"varint,6,opt,name=state,proto3,enum=basepb.NodeState" json:"state,omitempty"` Version int64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` RangePeers []*RangePeer `protobuf:"bytes,8,rep,name=range_peers,json=rangePeers,proto3" json:"range_peers,omitempty"` LastUpdateTime int64 `protobuf:"varint,9,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"` Type StoreType `protobuf:"varint,10,opt,name=type,proto3,enum=basepb.StoreType" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Node) Descriptor ¶
func (*Node) GetAdminPort ¶
func (*Node) GetLastUpdateTime ¶
func (*Node) GetRaftPort ¶
func (*Node) GetRangePeers ¶
func (*Node) GetServerPort ¶
func (*Node) GetVersion ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Unmarshal ¶
type NodeState ¶
type NodeState int32
1. Under any conditions, ms should initialize the new and old ds nodes into an Initial state after they are added to the cluster, except for the nodes that have been Logout. after ds self-inspection is completed, the data read-write service is officially launched via NodeLogin report Logout node,need to Initial by person
func (NodeState) EnumDescriptor ¶
type Peer ¶
type Peer struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` NodeId uint64 `protobuf:"varint,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` Type PeerType `protobuf:"varint,3,opt,name=type,proto3,enum=basepb.PeerType" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Peer) Descriptor ¶
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
func (*Peer) XXX_DiscardUnknown ¶
func (m *Peer) XXX_DiscardUnknown()
func (*Peer) XXX_Unmarshal ¶
type PeerStatus ¶
type PeerStatus struct { Peer *Peer `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` Commit uint64 `protobuf:"varint,3,opt,name=commit,proto3" json:"commit,omitempty"` DownSeconds uint64 `protobuf:"varint,4,opt,name=down_seconds,json=downSeconds,proto3" json:"down_seconds,omitempty"` Snapshotting bool `protobuf:"varint,5,opt,name=snapshotting,proto3" json:"snapshotting,omitempty"` Applied uint64 `protobuf:"varint,6,opt,name=applied,proto3" json:"applied,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PeerStatus) Descriptor ¶
func (*PeerStatus) Descriptor() ([]byte, []int)
func (*PeerStatus) GetApplied ¶
func (m *PeerStatus) GetApplied() uint64
func (*PeerStatus) GetCommit ¶
func (m *PeerStatus) GetCommit() uint64
func (*PeerStatus) GetDownSeconds ¶
func (m *PeerStatus) GetDownSeconds() uint64
func (*PeerStatus) GetIndex ¶
func (m *PeerStatus) GetIndex() uint64
func (*PeerStatus) GetPeer ¶
func (m *PeerStatus) GetPeer() *Peer
func (*PeerStatus) GetSnapshotting ¶
func (m *PeerStatus) GetSnapshotting() bool
func (*PeerStatus) Marshal ¶
func (m *PeerStatus) Marshal() (dAtA []byte, err error)
func (*PeerStatus) MarshalToSizedBuffer ¶
func (m *PeerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PeerStatus) ProtoMessage ¶
func (*PeerStatus) ProtoMessage()
func (*PeerStatus) Reset ¶
func (m *PeerStatus) Reset()
func (*PeerStatus) Size ¶
func (m *PeerStatus) Size() (n int)
func (*PeerStatus) String ¶
func (m *PeerStatus) String() string
func (*PeerStatus) Unmarshal ¶
func (m *PeerStatus) Unmarshal(dAtA []byte) error
func (*PeerStatus) XXX_DiscardUnknown ¶
func (m *PeerStatus) XXX_DiscardUnknown()
func (*PeerStatus) XXX_Marshal ¶
func (m *PeerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PeerStatus) XXX_Merge ¶
func (m *PeerStatus) XXX_Merge(src proto.Message)
func (*PeerStatus) XXX_Size ¶
func (m *PeerStatus) XXX_Size() int
func (*PeerStatus) XXX_Unmarshal ¶
func (m *PeerStatus) XXX_Unmarshal(b []byte) error
type Range ¶
type Range struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Range key range [start_key, end_key). // key by: prefix + table_id + real key StartKey []byte `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"` EndKey []byte `protobuf:"bytes,3,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` RangeEpoch *RangeEpoch `protobuf:"bytes,4,opt,name=range_epoch,json=rangeEpoch,proto3" json:"range_epoch,omitempty"` //default first peer is leader Peers []*Peer `protobuf:"bytes,5,rep,name=peers,proto3" json:"peers,omitempty"` DbId int32 `protobuf:"varint,6,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"` TableId int32 `protobuf:"varint,7,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` KeySchema *KeySchema `protobuf:"bytes,8,opt,name=key_schema,json=keySchema,proto3" json:"key_schema,omitempty"` Leader uint64 `protobuf:"varint,9,opt,name=leader,proto3" json:"leader,omitempty"` RangeType RangeType `protobuf:"varint,10,opt,name=range_type,json=rangeType,proto3,enum=basepb.RangeType" json:"range_type,omitempty"` StoreType StoreType `protobuf:"varint,11,opt,name=store_type,json=storeType,proto3,enum=basepb.StoreType" json:"store_type,omitempty"` Term uint64 `protobuf:"varint,12,opt,name=term,proto3" json:"term,omitempty"` ParentRangeId uint64 `protobuf:"varint,13,opt,name=parent_range_id,json=parentRangeId,proto3" json:"parent_range_id,omitempty"` IndexId int32 `protobuf:"varint,14,opt,name=index_id,json=indexId,proto3" json:"index_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Range) Descriptor ¶
func (*Range) GetIndexId ¶
func (*Range) GetKeySchema ¶
func (*Range) GetParentRangeId ¶
func (*Range) GetRangeEpoch ¶
func (m *Range) GetRangeEpoch() *RangeEpoch
func (*Range) GetRangeType ¶
func (*Range) GetStartKey ¶
func (*Range) GetStoreType ¶
func (*Range) GetTableId ¶
func (*Range) ProtoMessage ¶
func (*Range) ProtoMessage()
func (*Range) XXX_DiscardUnknown ¶
func (m *Range) XXX_DiscardUnknown()
func (*Range) XXX_Marshal ¶
func (*Range) XXX_Unmarshal ¶
type RangeEpoch ¶
type RangeEpoch struct { // Conf change version, auto increment when add or remove peer ConfVer uint64 `protobuf:"varint,1,opt,name=conf_ver,json=confVer,proto3" json:"conf_ver,omitempty"` // Range version, auto increment when split or merge Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
RegionEpoch is from tidb, and is and is licensed under the Apache Public License v2. Source code can be found here: https://github.com/pingcap/pd
func (*RangeEpoch) Descriptor ¶
func (*RangeEpoch) Descriptor() ([]byte, []int)
func (*RangeEpoch) GetConfVer ¶
func (m *RangeEpoch) GetConfVer() uint64
func (*RangeEpoch) GetVersion ¶
func (m *RangeEpoch) GetVersion() uint64
func (*RangeEpoch) Marshal ¶
func (m *RangeEpoch) Marshal() (dAtA []byte, err error)
func (*RangeEpoch) MarshalToSizedBuffer ¶
func (m *RangeEpoch) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RangeEpoch) ProtoMessage ¶
func (*RangeEpoch) ProtoMessage()
func (*RangeEpoch) Reset ¶
func (m *RangeEpoch) Reset()
func (*RangeEpoch) Size ¶
func (m *RangeEpoch) Size() (n int)
func (*RangeEpoch) String ¶
func (m *RangeEpoch) String() string
func (*RangeEpoch) Unmarshal ¶
func (m *RangeEpoch) Unmarshal(dAtA []byte) error
func (*RangeEpoch) XXX_DiscardUnknown ¶
func (m *RangeEpoch) XXX_DiscardUnknown()
func (*RangeEpoch) XXX_Marshal ¶
func (m *RangeEpoch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RangeEpoch) XXX_Merge ¶
func (m *RangeEpoch) XXX_Merge(src proto.Message)
func (*RangeEpoch) XXX_Size ¶
func (m *RangeEpoch) XXX_Size() int
func (*RangeEpoch) XXX_Unmarshal ¶
func (m *RangeEpoch) XXX_Unmarshal(b []byte) error
type RangePeer ¶
type RangePeer struct { RangeId uint64 `protobuf:"varint,1,opt,name=range_id,json=rangeId,proto3" json:"range_id,omitempty"` PeerId uint64 `protobuf:"varint,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` State RangePeerState `protobuf:"varint,3,opt,name=state,proto3,enum=basepb.RangePeerState" json:"state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RangePeer) Descriptor ¶
func (*RangePeer) GetRangeId ¶
func (*RangePeer) GetState ¶
func (m *RangePeer) GetState() RangePeerState
func (*RangePeer) MarshalToSizedBuffer ¶
func (*RangePeer) ProtoMessage ¶
func (*RangePeer) ProtoMessage()
func (*RangePeer) XXX_DiscardUnknown ¶
func (m *RangePeer) XXX_DiscardUnknown()
func (*RangePeer) XXX_Marshal ¶
func (*RangePeer) XXX_Unmarshal ¶
type RangePeerState ¶
type RangePeerState int32
const ( RangePeerState_RPS_Invalid RangePeerState = 0 RangePeerState_RPS_NoLeader RangePeerState = 1 RangePeerState_RPS_Follower RangePeerState = 2 RangePeerState_RPS_Leader RangePeerState = 3 )
func (RangePeerState) EnumDescriptor ¶
func (RangePeerState) EnumDescriptor() ([]byte, []int)
func (RangePeerState) String ¶
func (x RangePeerState) String() string
type Replica ¶
type Replica struct { RangeId uint64 `protobuf:"varint,1,opt,name=range_id,json=rangeId,proto3" json:"range_id,omitempty"` Peer *Peer `protobuf:"bytes,2,opt,name=peer,proto3" json:"peer,omitempty"` StartKey []byte `protobuf:"bytes,3,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"` EndKey []byte `protobuf:"bytes,4,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Replica) Descriptor ¶
func (*Replica) GetRangeId ¶
func (*Replica) GetStartKey ¶
func (*Replica) MarshalToSizedBuffer ¶
func (*Replica) ProtoMessage ¶
func (*Replica) ProtoMessage()
func (*Replica) XXX_DiscardUnknown ¶
func (m *Replica) XXX_DiscardUnknown()
func (*Replica) XXX_Marshal ¶
func (*Replica) XXX_Unmarshal ¶
type WatcherEvent ¶
type WatcherEvent struct { WatcherType WatcherType `protobuf:"varint,1,opt,name=watcher_type,json=watcherType,proto3,enum=basepb.WatcherType" json:"watcher_type,omitempty"` EventType EventType `protobuf:"varint,2,opt,name=event_type,json=eventType,proto3,enum=basepb.EventType" json:"event_type,omitempty"` NodeId uint64 `protobuf:"varint,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` DbId int32 `protobuf:"varint,4,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"` TableId int32 `protobuf:"varint,5,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` RangeId uint64 `protobuf:"varint,6,opt,name=range_id,json=rangeId,proto3" json:"range_id,omitempty"` Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` Version uint64 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
node event has nodeID db event has dbID table event has dbID,tableID range event has tableID, rangeID
func (*WatcherEvent) Descriptor ¶
func (*WatcherEvent) Descriptor() ([]byte, []int)
func (*WatcherEvent) GetDbId ¶
func (m *WatcherEvent) GetDbId() int32
func (*WatcherEvent) GetEventType ¶
func (m *WatcherEvent) GetEventType() EventType
func (*WatcherEvent) GetNodeId ¶
func (m *WatcherEvent) GetNodeId() uint64
func (*WatcherEvent) GetRangeId ¶
func (m *WatcherEvent) GetRangeId() uint64
func (*WatcherEvent) GetTableId ¶
func (m *WatcherEvent) GetTableId() int32
func (*WatcherEvent) GetValue ¶
func (m *WatcherEvent) GetValue() []byte
func (*WatcherEvent) GetVersion ¶
func (m *WatcherEvent) GetVersion() uint64
func (*WatcherEvent) GetWatcherType ¶
func (m *WatcherEvent) GetWatcherType() WatcherType
func (*WatcherEvent) Marshal ¶
func (m *WatcherEvent) Marshal() (dAtA []byte, err error)
func (*WatcherEvent) MarshalToSizedBuffer ¶
func (m *WatcherEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WatcherEvent) ProtoMessage ¶
func (*WatcherEvent) ProtoMessage()
func (*WatcherEvent) Reset ¶
func (m *WatcherEvent) Reset()
func (*WatcherEvent) Size ¶
func (m *WatcherEvent) Size() (n int)
func (*WatcherEvent) String ¶
func (m *WatcherEvent) String() string
func (*WatcherEvent) Unmarshal ¶
func (m *WatcherEvent) Unmarshal(dAtA []byte) error
func (*WatcherEvent) XXX_DiscardUnknown ¶
func (m *WatcherEvent) XXX_DiscardUnknown()
func (*WatcherEvent) XXX_Marshal ¶
func (m *WatcherEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatcherEvent) XXX_Merge ¶
func (m *WatcherEvent) XXX_Merge(src proto.Message)
func (*WatcherEvent) XXX_Size ¶
func (m *WatcherEvent) XXX_Size() int
func (*WatcherEvent) XXX_Unmarshal ¶
func (m *WatcherEvent) XXX_Unmarshal(b []byte) error
type WatcherType ¶
type WatcherType int32
const ( WatcherType_Watcher_Type_Invalid WatcherType = 0 WatcherType_Watcher_Type_Node WatcherType = 1 WatcherType_Watcher_Type_Database WatcherType = 2 WatcherType_Watcher_Type_Table WatcherType = 3 WatcherType_Watcher_Type_Range WatcherType = 4 )
func (WatcherType) EnumDescriptor ¶
func (WatcherType) EnumDescriptor() ([]byte, []int)
func (WatcherType) String ¶
func (x WatcherType) String() string