Documentation
¶
Overview ¶
Package ms_raftcmdpb is a generated protocol buffer package.
It is generated from these files:
ms_raftcmdpb.proto
It has these top-level messages:
RaftKvPair KvPair GetRequest GetResponse PutRequest PutResponse DeleteRequest DeleteResponse KvPairExecute ExecuteRequest ExecuteResponse Request Response
Index ¶
- Variables
- type CmdType
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)
- func (m *DeleteRequest) GetKey() []byte
- func (m *DeleteRequest) Marshal() (dAtA []byte, err error)
- func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error)
- func (*DeleteRequest) ProtoMessage()
- func (m *DeleteRequest) Reset()
- func (m *DeleteRequest) Size() (n int)
- func (m *DeleteRequest) String() string
- func (m *DeleteRequest) Unmarshal(dAtA []byte) error
- type DeleteResponse
- func (*DeleteResponse) Descriptor() ([]byte, []int)
- func (m *DeleteResponse) GetCode() int32
- func (m *DeleteResponse) Marshal() (dAtA []byte, err error)
- func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error)
- func (*DeleteResponse) ProtoMessage()
- func (m *DeleteResponse) Reset()
- func (m *DeleteResponse) Size() (n int)
- func (m *DeleteResponse) String() string
- func (m *DeleteResponse) Unmarshal(dAtA []byte) error
- type ExecuteRequest
- func (*ExecuteRequest) Descriptor() ([]byte, []int)
- func (m *ExecuteRequest) GetExecs() []*KvPairExecute
- func (m *ExecuteRequest) Marshal() (dAtA []byte, err error)
- func (m *ExecuteRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ExecuteRequest) ProtoMessage()
- func (m *ExecuteRequest) Reset()
- func (m *ExecuteRequest) Size() (n int)
- func (m *ExecuteRequest) String() string
- func (m *ExecuteRequest) Unmarshal(dAtA []byte) error
- type ExecuteResponse
- func (*ExecuteResponse) Descriptor() ([]byte, []int)
- func (m *ExecuteResponse) GetCode() int32
- func (m *ExecuteResponse) Marshal() (dAtA []byte, err error)
- func (m *ExecuteResponse) MarshalTo(dAtA []byte) (int, error)
- func (*ExecuteResponse) ProtoMessage()
- func (m *ExecuteResponse) Reset()
- func (m *ExecuteResponse) Size() (n int)
- func (m *ExecuteResponse) String() string
- func (m *ExecuteResponse) Unmarshal(dAtA []byte) error
- type ExecuteType
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) GetKey() []byte
- func (m *GetRequest) Marshal() (dAtA []byte, err error)
- func (m *GetRequest) MarshalTo(dAtA []byte) (int, error)
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) Size() (n int)
- func (m *GetRequest) String() string
- func (m *GetRequest) Unmarshal(dAtA []byte) error
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)
- func (m *GetResponse) GetCode() int32
- func (m *GetResponse) GetValue() []byte
- func (m *GetResponse) Marshal() (dAtA []byte, err error)
- func (m *GetResponse) MarshalTo(dAtA []byte) (int, error)
- func (*GetResponse) ProtoMessage()
- func (m *GetResponse) Reset()
- func (m *GetResponse) Size() (n int)
- func (m *GetResponse) String() string
- func (m *GetResponse) Unmarshal(dAtA []byte) error
- type KvPair
- func (*KvPair) Descriptor() ([]byte, []int)
- func (m *KvPair) GetKey() []byte
- func (m *KvPair) GetValue() []byte
- func (m *KvPair) Marshal() (dAtA []byte, err error)
- func (m *KvPair) MarshalTo(dAtA []byte) (int, error)
- func (*KvPair) ProtoMessage()
- func (m *KvPair) Reset()
- func (m *KvPair) Size() (n int)
- func (m *KvPair) String() string
- func (m *KvPair) Unmarshal(dAtA []byte) error
- type KvPairExecute
- func (*KvPairExecute) Descriptor() ([]byte, []int)
- func (m *KvPairExecute) GetDo() ExecuteType
- func (m *KvPairExecute) GetKvPair() *KvPair
- func (m *KvPairExecute) Marshal() (dAtA []byte, err error)
- func (m *KvPairExecute) MarshalTo(dAtA []byte) (int, error)
- func (*KvPairExecute) ProtoMessage()
- func (m *KvPairExecute) Reset()
- func (m *KvPairExecute) Size() (n int)
- func (m *KvPairExecute) String() string
- func (m *KvPairExecute) Unmarshal(dAtA []byte) error
- type PutRequest
- func (*PutRequest) Descriptor() ([]byte, []int)
- func (m *PutRequest) GetKey() []byte
- func (m *PutRequest) GetValue() []byte
- func (m *PutRequest) Marshal() (dAtA []byte, err error)
- func (m *PutRequest) MarshalTo(dAtA []byte) (int, error)
- func (*PutRequest) ProtoMessage()
- func (m *PutRequest) Reset()
- func (m *PutRequest) Size() (n int)
- func (m *PutRequest) String() string
- func (m *PutRequest) Unmarshal(dAtA []byte) error
- type PutResponse
- func (*PutResponse) Descriptor() ([]byte, []int)
- func (m *PutResponse) GetCode() int32
- func (m *PutResponse) Marshal() (dAtA []byte, err error)
- func (m *PutResponse) MarshalTo(dAtA []byte) (int, error)
- func (*PutResponse) ProtoMessage()
- func (m *PutResponse) Reset()
- func (m *PutResponse) Size() (n int)
- func (m *PutResponse) String() string
- func (m *PutResponse) Unmarshal(dAtA []byte) error
- type RaftKvPair
- func (*RaftKvPair) Descriptor() ([]byte, []int)
- func (m *RaftKvPair) GetApplyIndex() uint64
- func (m *RaftKvPair) GetKey() []byte
- func (m *RaftKvPair) GetTimestamp() uint64
- func (m *RaftKvPair) GetValue() []byte
- func (m *RaftKvPair) Marshal() (dAtA []byte, err error)
- func (m *RaftKvPair) MarshalTo(dAtA []byte) (int, error)
- func (*RaftKvPair) ProtoMessage()
- func (m *RaftKvPair) Reset()
- func (m *RaftKvPair) Size() (n int)
- func (m *RaftKvPair) String() string
- func (m *RaftKvPair) Unmarshal(dAtA []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetCmdType() CmdType
- func (m *Request) GetDeleteReq() *DeleteRequest
- func (m *Request) GetExecuteReq() *ExecuteRequest
- func (m *Request) GetGetReq() *GetRequest
- func (m *Request) GetPutReq() *PutRequest
- func (m *Request) Marshal() (dAtA []byte, err error)
- func (m *Request) MarshalTo(dAtA []byte) (int, error)
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) Size() (n int)
- func (m *Request) String() string
- func (m *Request) Unmarshal(dAtA []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetCmdType() CmdType
- func (m *Response) GetDeleteResp() *DeleteResponse
- func (m *Response) GetExecuteResp() *ExecuteResponse
- func (m *Response) GetGetResp() *GetResponse
- func (m *Response) GetPutResp() *PutResponse
- func (m *Response) Marshal() (dAtA []byte, err error)
- func (m *Response) MarshalTo(dAtA []byte) (int, error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (m *Response) String() string
- func (m *Response) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMsRaftcmdpb = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMsRaftcmdpb = fmt.Errorf("proto: integer overflow") )
View Source
var CmdType_name = map[int32]string{
0: "Invalid",
1: "Get",
2: "Put",
3: "Delete",
4: "Execute",
}
View Source
var CmdType_value = map[string]int32{
"Invalid": 0,
"Get": 1,
"Put": 2,
"Delete": 3,
"Execute": 4,
}
View Source
var ExecuteType_name = map[int32]string{
0: "ExecInvalid",
1: "ExecPut",
2: "ExecDelete",
}
View Source
var ExecuteType_value = map[string]int32{
"ExecInvalid": 0,
"ExecPut": 1,
"ExecDelete": 2,
}
Functions ¶
This section is empty.
Types ¶
type DeleteRequest ¶
type DeleteRequest struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (*DeleteRequest) Descriptor ¶
func (*DeleteRequest) Descriptor() ([]byte, []int)
func (*DeleteRequest) GetKey ¶
func (m *DeleteRequest) GetKey() []byte
func (*DeleteRequest) Marshal ¶
func (m *DeleteRequest) Marshal() (dAtA []byte, err error)
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) Reset ¶
func (m *DeleteRequest) Reset()
func (*DeleteRequest) Size ¶
func (m *DeleteRequest) Size() (n int)
func (*DeleteRequest) String ¶
func (m *DeleteRequest) String() string
func (*DeleteRequest) Unmarshal ¶
func (m *DeleteRequest) Unmarshal(dAtA []byte) error
type DeleteResponse ¶
type DeleteResponse struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
}
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) GetCode ¶
func (m *DeleteResponse) GetCode() int32
func (*DeleteResponse) Marshal ¶
func (m *DeleteResponse) Marshal() (dAtA []byte, err error)
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) Size ¶
func (m *DeleteResponse) Size() (n int)
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
func (*DeleteResponse) Unmarshal ¶
func (m *DeleteResponse) Unmarshal(dAtA []byte) error
type ExecuteRequest ¶
type ExecuteRequest struct {
// 历史原因,只能是2
Execs []*KvPairExecute `protobuf:"bytes,1,rep,name=execs" json:"execs,omitempty"`
}
func (*ExecuteRequest) Descriptor ¶
func (*ExecuteRequest) Descriptor() ([]byte, []int)
func (*ExecuteRequest) GetExecs ¶
func (m *ExecuteRequest) GetExecs() []*KvPairExecute
func (*ExecuteRequest) Marshal ¶
func (m *ExecuteRequest) Marshal() (dAtA []byte, err error)
func (*ExecuteRequest) ProtoMessage ¶
func (*ExecuteRequest) ProtoMessage()
func (*ExecuteRequest) Reset ¶
func (m *ExecuteRequest) Reset()
func (*ExecuteRequest) Size ¶
func (m *ExecuteRequest) Size() (n int)
func (*ExecuteRequest) String ¶
func (m *ExecuteRequest) String() string
func (*ExecuteRequest) Unmarshal ¶
func (m *ExecuteRequest) Unmarshal(dAtA []byte) error
type ExecuteResponse ¶
type ExecuteResponse struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
}
func (*ExecuteResponse) Descriptor ¶
func (*ExecuteResponse) Descriptor() ([]byte, []int)
func (*ExecuteResponse) GetCode ¶
func (m *ExecuteResponse) GetCode() int32
func (*ExecuteResponse) Marshal ¶
func (m *ExecuteResponse) Marshal() (dAtA []byte, err error)
func (*ExecuteResponse) ProtoMessage ¶
func (*ExecuteResponse) ProtoMessage()
func (*ExecuteResponse) Reset ¶
func (m *ExecuteResponse) Reset()
func (*ExecuteResponse) Size ¶
func (m *ExecuteResponse) Size() (n int)
func (*ExecuteResponse) String ¶
func (m *ExecuteResponse) String() string
func (*ExecuteResponse) Unmarshal ¶
func (m *ExecuteResponse) Unmarshal(dAtA []byte) error
type ExecuteType ¶
type ExecuteType int32
const ( ExecuteType_ExecInvalid ExecuteType = 0 ExecuteType_ExecPut ExecuteType = 1 ExecuteType_ExecDelete ExecuteType = 2 )
func (ExecuteType) EnumDescriptor ¶
func (ExecuteType) EnumDescriptor() ([]byte, []int)
func (ExecuteType) String ¶
func (x ExecuteType) String() string
type GetRequest ¶
type GetRequest struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetKey ¶
func (m *GetRequest) GetKey() []byte
func (*GetRequest) Marshal ¶
func (m *GetRequest) Marshal() (dAtA []byte, err error)
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) Size ¶
func (m *GetRequest) Size() (n int)
func (*GetRequest) String ¶
func (m *GetRequest) String() string
func (*GetRequest) Unmarshal ¶
func (m *GetRequest) Unmarshal(dAtA []byte) error
type GetResponse ¶
type GetResponse struct {
// 0: success 1: not leader 2: raft busy 3: other error
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetCode ¶
func (m *GetResponse) GetCode() int32
func (*GetResponse) GetValue ¶
func (m *GetResponse) GetValue() []byte
func (*GetResponse) Marshal ¶
func (m *GetResponse) Marshal() (dAtA []byte, err error)
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) Size ¶
func (m *GetResponse) Size() (n int)
func (*GetResponse) String ¶
func (m *GetResponse) String() string
func (*GetResponse) Unmarshal ¶
func (m *GetResponse) Unmarshal(dAtA []byte) error
type KvPair ¶
type KvPair struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (*KvPair) Descriptor ¶
func (*KvPair) ProtoMessage ¶
func (*KvPair) ProtoMessage()
type KvPairExecute ¶
type KvPairExecute struct {
Do ExecuteType `protobuf:"varint,1,opt,name=do,proto3,enum=ms_raftcmdpb.ExecuteType" json:"do,omitempty"`
KvPair *KvPair `protobuf:"bytes,2,opt,name=kv_pair,json=kvPair" json:"kv_pair,omitempty"`
}
func (*KvPairExecute) Descriptor ¶
func (*KvPairExecute) Descriptor() ([]byte, []int)
func (*KvPairExecute) GetDo ¶
func (m *KvPairExecute) GetDo() ExecuteType
func (*KvPairExecute) GetKvPair ¶
func (m *KvPairExecute) GetKvPair() *KvPair
func (*KvPairExecute) Marshal ¶
func (m *KvPairExecute) Marshal() (dAtA []byte, err error)
func (*KvPairExecute) ProtoMessage ¶
func (*KvPairExecute) ProtoMessage()
func (*KvPairExecute) Reset ¶
func (m *KvPairExecute) Reset()
func (*KvPairExecute) Size ¶
func (m *KvPairExecute) Size() (n int)
func (*KvPairExecute) String ¶
func (m *KvPairExecute) String() string
func (*KvPairExecute) Unmarshal ¶
func (m *KvPairExecute) Unmarshal(dAtA []byte) error
type PutRequest ¶
type PutRequest struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (*PutRequest) Descriptor ¶
func (*PutRequest) Descriptor() ([]byte, []int)
func (*PutRequest) GetKey ¶
func (m *PutRequest) GetKey() []byte
func (*PutRequest) GetValue ¶
func (m *PutRequest) GetValue() []byte
func (*PutRequest) Marshal ¶
func (m *PutRequest) Marshal() (dAtA []byte, err error)
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) Reset ¶
func (m *PutRequest) Reset()
func (*PutRequest) Size ¶
func (m *PutRequest) Size() (n int)
func (*PutRequest) String ¶
func (m *PutRequest) String() string
func (*PutRequest) Unmarshal ¶
func (m *PutRequest) Unmarshal(dAtA []byte) error
type PutResponse ¶
type PutResponse struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
}
func (*PutResponse) Descriptor ¶
func (*PutResponse) Descriptor() ([]byte, []int)
func (*PutResponse) GetCode ¶
func (m *PutResponse) GetCode() int32
func (*PutResponse) Marshal ¶
func (m *PutResponse) Marshal() (dAtA []byte, err error)
func (*PutResponse) ProtoMessage ¶
func (*PutResponse) ProtoMessage()
func (*PutResponse) Reset ¶
func (m *PutResponse) Reset()
func (*PutResponse) Size ¶
func (m *PutResponse) Size() (n int)
func (*PutResponse) String ¶
func (m *PutResponse) String() string
func (*PutResponse) Unmarshal ¶
func (m *PutResponse) Unmarshal(dAtA []byte) error
type RaftKvPair ¶
type RaftKvPair struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
ApplyIndex uint64 `protobuf:"varint,4,opt,name=applyIndex,proto3" json:"applyIndex,omitempty"`
}
func (*RaftKvPair) Descriptor ¶
func (*RaftKvPair) Descriptor() ([]byte, []int)
func (*RaftKvPair) GetApplyIndex ¶
func (m *RaftKvPair) GetApplyIndex() uint64
func (*RaftKvPair) GetKey ¶
func (m *RaftKvPair) GetKey() []byte
func (*RaftKvPair) GetTimestamp ¶
func (m *RaftKvPair) GetTimestamp() uint64
func (*RaftKvPair) GetValue ¶
func (m *RaftKvPair) GetValue() []byte
func (*RaftKvPair) Marshal ¶
func (m *RaftKvPair) Marshal() (dAtA []byte, err error)
func (*RaftKvPair) ProtoMessage ¶
func (*RaftKvPair) ProtoMessage()
func (*RaftKvPair) Reset ¶
func (m *RaftKvPair) Reset()
func (*RaftKvPair) Size ¶
func (m *RaftKvPair) Size() (n int)
func (*RaftKvPair) String ¶
func (m *RaftKvPair) String() string
func (*RaftKvPair) Unmarshal ¶
func (m *RaftKvPair) Unmarshal(dAtA []byte) error
type Request ¶
type Request struct {
CmdType CmdType `protobuf:"varint,2,opt,name=cmd_type,json=cmdType,proto3,enum=ms_raftcmdpb.CmdType" json:"cmd_type,omitempty"`
GetReq *GetRequest `protobuf:"bytes,3,opt,name=get_req,json=getReq" json:"get_req,omitempty"`
PutReq *PutRequest `protobuf:"bytes,4,opt,name=put_req,json=putReq" json:"put_req,omitempty"`
DeleteReq *DeleteRequest `protobuf:"bytes,5,opt,name=delete_req,json=deleteReq" json:"delete_req,omitempty"`
ExecuteReq *ExecuteRequest `protobuf:"bytes,6,opt,name=execute_req,json=executeReq" json:"execute_req,omitempty"`
}
func (*Request) Descriptor ¶
func (*Request) GetCmdType ¶
func (*Request) GetDeleteReq ¶
func (m *Request) GetDeleteReq() *DeleteRequest
func (*Request) GetExecuteReq ¶
func (m *Request) GetExecuteReq() *ExecuteRequest
func (*Request) GetGetReq ¶
func (m *Request) GetGetReq() *GetRequest
func (*Request) GetPutReq ¶
func (m *Request) GetPutReq() *PutRequest
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct {
CmdType CmdType `protobuf:"varint,1,opt,name=cmd_type,json=cmdType,proto3,enum=ms_raftcmdpb.CmdType" json:"cmd_type,omitempty"`
GetResp *GetResponse `protobuf:"bytes,2,opt,name=get_resp,json=getResp" json:"get_resp,omitempty"`
PutResp *PutResponse `protobuf:"bytes,3,opt,name=put_resp,json=putResp" json:"put_resp,omitempty"`
DeleteResp *DeleteResponse `protobuf:"bytes,4,opt,name=delete_resp,json=deleteResp" json:"delete_resp,omitempty"`
ExecuteResp *ExecuteResponse `protobuf:"bytes,5,opt,name=execute_resp,json=executeResp" json:"execute_resp,omitempty"`
}
func (*Response) Descriptor ¶
func (*Response) GetCmdType ¶
func (*Response) GetDeleteResp ¶
func (m *Response) GetDeleteResp() *DeleteResponse
func (*Response) GetExecuteResp ¶
func (m *Response) GetExecuteResp() *ExecuteResponse
func (*Response) GetGetResp ¶
func (m *Response) GetGetResp() *GetResponse
func (*Response) GetPutResp ¶
func (m *Response) GetPutResp() *PutResponse
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.