basepb

package
v0.0.0-...-927e444 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBasepb        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBasepb          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBasepb = fmt.Errorf("proto: unexpected end of group")
)
View Source
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",
}
View Source
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,
}
View Source
var EventType_name = map[int32]string{
	0: "Event_Type_Invalid",
	1: "Event_Type_PUT",
	2: "Event_Type_DELETE",
}
View Source
var EventType_value = map[string]int32{
	"Event_Type_Invalid": 0,
	"Event_Type_PUT":     1,
	"Event_Type_DELETE":  2,
}
View Source
var NodeState_name = map[int32]string{
	0: "N_Invalid",
	1: "N_Online",
	2: "N_Offline",
	3: "N_Updating",
	4: "N_Offlining",
}
View Source
var NodeState_value = map[string]int32{
	"N_Invalid":   0,
	"N_Online":    1,
	"N_Offline":   2,
	"N_Updating":  3,
	"N_Offlining": 4,
}
View Source
var PeerType_name = map[int32]string{
	0: "PeerType_Invalid",
	1: "PeerType_Normal",
	2: "PeerType_Learner",
}
View Source
var PeerType_value = map[string]int32{
	"PeerType_Invalid": 0,
	"PeerType_Normal":  1,
	"PeerType_Learner": 2,
}
View Source
var RangePeerState_name = map[int32]string{
	0: "RPS_Invalid",
	1: "RPS_NoLeader",
	2: "RPS_Follower",
	3: "RPS_Leader",
}
View Source
var RangePeerState_value = map[string]int32{
	"RPS_Invalid":  0,
	"RPS_NoLeader": 1,
	"RPS_Follower": 2,
	"RPS_Leader":   3,
}
View Source
var RangeType_name = map[int32]string{
	0: "RNG_Invalid",
	1: "RNG_Index",
	2: "RNG_Data",
}
View Source
var RangeType_value = map[string]int32{
	"RNG_Invalid": 0,
	"RNG_Index":   1,
	"RNG_Data":    2,
}
View Source
var StoreType_name = map[int32]string{
	0: "Store_Invalid",
	1: "Store_Hot",
	2: "Store_Warm",
	3: "Store_Mix",
}
View Source
var StoreType_value = map[string]int32{
	"Store_Invalid": 0,
	"Store_Hot":     1,
	"Store_Warm":    2,
	"Store_Mix":     3,
}
View Source
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",
}
View Source
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

func (DataType) EnumDescriptor() ([]byte, []int)

func (DataType) String

func (x DataType) String() string

type EventType

type EventType int32
const (
	EventType_Event_Type_Invalid EventType = 0
	EventType_Event_Type_PUT     EventType = 1
	EventType_Event_Type_DELETE  EventType = 2
)

func (EventType) EnumDescriptor

func (EventType) EnumDescriptor() ([]byte, []int)

func (EventType) String

func (x EventType) String() string

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) Descriptor() ([]byte, []int)

func (*KeySchema) GetExtraCols

func (m *KeySchema) GetExtraCols() []*KeySchema_ColumnInfo

func (*KeySchema) GetKeyCols

func (m *KeySchema) GetKeyCols() []*KeySchema_ColumnInfo

func (*KeySchema) GetUniqueIndex

func (m *KeySchema) GetUniqueIndex() bool

func (*KeySchema) Marshal

func (m *KeySchema) Marshal() (dAtA []byte, err error)

func (*KeySchema) MarshalTo

func (m *KeySchema) MarshalTo(dAtA []byte) (int, error)

func (*KeySchema) MarshalToSizedBuffer

func (m *KeySchema) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KeySchema) ProtoMessage

func (*KeySchema) ProtoMessage()

func (*KeySchema) Reset

func (m *KeySchema) Reset()

func (*KeySchema) Size

func (m *KeySchema) Size() (n int)

func (*KeySchema) String

func (m *KeySchema) String() string

func (*KeySchema) Unmarshal

func (m *KeySchema) Unmarshal(dAtA []byte) error

func (*KeySchema) XXX_DiscardUnknown

func (m *KeySchema) XXX_DiscardUnknown()

func (*KeySchema) XXX_Marshal

func (m *KeySchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeySchema) XXX_Merge

func (m *KeySchema) XXX_Merge(src proto.Message)

func (*KeySchema) XXX_Size

func (m *KeySchema) XXX_Size() int

func (*KeySchema) XXX_Unmarshal

func (m *KeySchema) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Leader) GetNodeAddr

func (m *Leader) GetNodeAddr() string

func (*Leader) GetNodeId

func (m *Leader) GetNodeId() uint64

func (*Leader) GetRangeId

func (m *Leader) GetRangeId() uint64

func (*Leader) Marshal

func (m *Leader) Marshal() (dAtA []byte, err error)

func (*Leader) MarshalTo

func (m *Leader) MarshalTo(dAtA []byte) (int, error)

func (*Leader) MarshalToSizedBuffer

func (m *Leader) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Leader) ProtoMessage

func (*Leader) ProtoMessage()

func (*Leader) Reset

func (m *Leader) Reset()

func (*Leader) Size

func (m *Leader) Size() (n int)

func (*Leader) String

func (m *Leader) String() string

func (*Leader) Unmarshal

func (m *Leader) Unmarshal(dAtA []byte) error

func (*Leader) XXX_DiscardUnknown

func (m *Leader) XXX_DiscardUnknown()

func (*Leader) XXX_Marshal

func (m *Leader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Leader) XXX_Merge

func (m *Leader) XXX_Merge(src proto.Message)

func (*Leader) XXX_Size

func (m *Leader) XXX_Size() int

func (*Leader) XXX_Unmarshal

func (m *Leader) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Node) GetAdminPort

func (m *Node) GetAdminPort() uint32

func (*Node) GetId

func (m *Node) GetId() uint64

func (*Node) GetIp

func (m *Node) GetIp() string

func (*Node) GetLastUpdateTime

func (m *Node) GetLastUpdateTime() int64

func (*Node) GetRaftPort

func (m *Node) GetRaftPort() uint32

func (*Node) GetRangePeers

func (m *Node) GetRangePeers() []*RangePeer

func (*Node) GetServerPort

func (m *Node) GetServerPort() uint32

func (*Node) GetState

func (m *Node) GetState() NodeState

func (*Node) GetType

func (m *Node) GetType() StoreType

func (*Node) GetVersion

func (m *Node) GetVersion() int64

func (*Node) Marshal

func (m *Node) Marshal() (dAtA []byte, err error)

func (*Node) MarshalTo

func (m *Node) MarshalTo(dAtA []byte) (int, error)

func (*Node) MarshalToSizedBuffer

func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

func (m *Node) Size() (n int)

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

func (m *Node) Unmarshal(dAtA []byte) error

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

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

const (
	NodeState_N_Invalid   NodeState = 0
	NodeState_N_Online    NodeState = 1
	NodeState_N_Offline   NodeState = 2
	NodeState_N_Updating  NodeState = 3
	NodeState_N_Offlining NodeState = 4
)

func (NodeState) EnumDescriptor

func (NodeState) EnumDescriptor() ([]byte, []int)

func (NodeState) String

func (x NodeState) String() string

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) Descriptor() ([]byte, []int)

func (*Peer) GetId

func (m *Peer) GetId() uint64

func (*Peer) GetNodeId

func (m *Peer) GetNodeId() uint64

func (*Peer) GetType

func (m *Peer) GetType() PeerType

func (*Peer) Marshal

func (m *Peer) Marshal() (dAtA []byte, err error)

func (*Peer) MarshalTo

func (m *Peer) MarshalTo(dAtA []byte) (int, error)

func (*Peer) MarshalToSizedBuffer

func (m *Peer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) Size

func (m *Peer) Size() (n int)

func (*Peer) String

func (m *Peer) String() string

func (*Peer) Unmarshal

func (m *Peer) Unmarshal(dAtA []byte) error

func (*Peer) XXX_DiscardUnknown

func (m *Peer) XXX_DiscardUnknown()

func (*Peer) XXX_Marshal

func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Peer) XXX_Merge

func (m *Peer) XXX_Merge(src proto.Message)

func (*Peer) XXX_Size

func (m *Peer) XXX_Size() int

func (*Peer) XXX_Unmarshal

func (m *Peer) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *PeerStatus) MarshalTo(dAtA []byte) (int, 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 PeerType

type PeerType int32
const (
	PeerType_PeerType_Invalid PeerType = 0
	PeerType_PeerType_Normal  PeerType = 1
	PeerType_PeerType_Learner PeerType = 2
)

func (PeerType) EnumDescriptor

func (PeerType) EnumDescriptor() ([]byte, []int)

func (PeerType) String

func (x PeerType) String() string

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) Descriptor() ([]byte, []int)

func (*Range) GetDbId

func (m *Range) GetDbId() int32

func (*Range) GetEndKey

func (m *Range) GetEndKey() []byte

func (*Range) GetId

func (m *Range) GetId() uint64

func (*Range) GetIndexId

func (m *Range) GetIndexId() int32

func (*Range) GetKeySchema

func (m *Range) GetKeySchema() *KeySchema

func (*Range) GetLeader

func (m *Range) GetLeader() uint64

func (*Range) GetParentRangeId

func (m *Range) GetParentRangeId() uint64

func (*Range) GetPeers

func (m *Range) GetPeers() []*Peer

func (*Range) GetRangeEpoch

func (m *Range) GetRangeEpoch() *RangeEpoch

func (*Range) GetRangeType

func (m *Range) GetRangeType() RangeType

func (*Range) GetStartKey

func (m *Range) GetStartKey() []byte

func (*Range) GetStoreType

func (m *Range) GetStoreType() StoreType

func (*Range) GetTableId

func (m *Range) GetTableId() int32

func (*Range) GetTerm

func (m *Range) GetTerm() uint64

func (*Range) Marshal

func (m *Range) Marshal() (dAtA []byte, err error)

func (*Range) MarshalTo

func (m *Range) MarshalTo(dAtA []byte) (int, error)

func (*Range) MarshalToSizedBuffer

func (m *Range) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Range) ProtoMessage

func (*Range) ProtoMessage()

func (*Range) Reset

func (m *Range) Reset()

func (*Range) Size

func (m *Range) Size() (n int)

func (*Range) String

func (m *Range) String() string

func (*Range) Unmarshal

func (m *Range) Unmarshal(dAtA []byte) error

func (*Range) XXX_DiscardUnknown

func (m *Range) XXX_DiscardUnknown()

func (*Range) XXX_Marshal

func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Range) XXX_Merge

func (m *Range) XXX_Merge(src proto.Message)

func (*Range) XXX_Size

func (m *Range) XXX_Size() int

func (*Range) XXX_Unmarshal

func (m *Range) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *RangeEpoch) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*RangePeer) GetPeerId

func (m *RangePeer) GetPeerId() uint64

func (*RangePeer) GetRangeId

func (m *RangePeer) GetRangeId() uint64

func (*RangePeer) GetState

func (m *RangePeer) GetState() RangePeerState

func (*RangePeer) Marshal

func (m *RangePeer) Marshal() (dAtA []byte, err error)

func (*RangePeer) MarshalTo

func (m *RangePeer) MarshalTo(dAtA []byte) (int, error)

func (*RangePeer) MarshalToSizedBuffer

func (m *RangePeer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RangePeer) ProtoMessage

func (*RangePeer) ProtoMessage()

func (*RangePeer) Reset

func (m *RangePeer) Reset()

func (*RangePeer) Size

func (m *RangePeer) Size() (n int)

func (*RangePeer) String

func (m *RangePeer) String() string

func (*RangePeer) Unmarshal

func (m *RangePeer) Unmarshal(dAtA []byte) error

func (*RangePeer) XXX_DiscardUnknown

func (m *RangePeer) XXX_DiscardUnknown()

func (*RangePeer) XXX_Marshal

func (m *RangePeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RangePeer) XXX_Merge

func (m *RangePeer) XXX_Merge(src proto.Message)

func (*RangePeer) XXX_Size

func (m *RangePeer) XXX_Size() int

func (*RangePeer) XXX_Unmarshal

func (m *RangePeer) XXX_Unmarshal(b []byte) error

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 RangeType

type RangeType int32
const (
	RangeType_RNG_Invalid RangeType = 0
	RangeType_RNG_Index   RangeType = 1
	RangeType_RNG_Data    RangeType = 2
)

func (RangeType) EnumDescriptor

func (RangeType) EnumDescriptor() ([]byte, []int)

func (RangeType) String

func (x RangeType) 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) Descriptor() ([]byte, []int)

func (*Replica) GetEndKey

func (m *Replica) GetEndKey() []byte

func (*Replica) GetPeer

func (m *Replica) GetPeer() *Peer

func (*Replica) GetRangeId

func (m *Replica) GetRangeId() uint64

func (*Replica) GetStartKey

func (m *Replica) GetStartKey() []byte

func (*Replica) Marshal

func (m *Replica) Marshal() (dAtA []byte, err error)

func (*Replica) MarshalTo

func (m *Replica) MarshalTo(dAtA []byte) (int, error)

func (*Replica) MarshalToSizedBuffer

func (m *Replica) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Replica) ProtoMessage

func (*Replica) ProtoMessage()

func (*Replica) Reset

func (m *Replica) Reset()

func (*Replica) Size

func (m *Replica) Size() (n int)

func (*Replica) String

func (m *Replica) String() string

func (*Replica) Unmarshal

func (m *Replica) Unmarshal(dAtA []byte) error

func (*Replica) XXX_DiscardUnknown

func (m *Replica) XXX_DiscardUnknown()

func (*Replica) XXX_Marshal

func (m *Replica) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Replica) XXX_Merge

func (m *Replica) XXX_Merge(src proto.Message)

func (*Replica) XXX_Size

func (m *Replica) XXX_Size() int

func (*Replica) XXX_Unmarshal

func (m *Replica) XXX_Unmarshal(b []byte) error

type StoreType

type StoreType int32
const (
	StoreType_Store_Invalid StoreType = 0
	StoreType_Store_Hot     StoreType = 1
	StoreType_Store_Warm    StoreType = 2
	StoreType_Store_Mix     StoreType = 3
)

func (StoreType) EnumDescriptor

func (StoreType) EnumDescriptor() ([]byte, []int)

func (StoreType) String

func (x StoreType) String() string

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) MarshalTo

func (m *WatcherEvent) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL