ms_raftcmdpb

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

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

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 CmdType

type CmdType int32
const (
	CmdType_Invalid CmdType = 0
	CmdType_Get     CmdType = 1
	CmdType_Put     CmdType = 2
	CmdType_Delete  CmdType = 3
	CmdType_Execute CmdType = 4
)

func (CmdType) EnumDescriptor

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

func (CmdType) String

func (x CmdType) String() string

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

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

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

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

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

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

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

func (*KvPair) GetKey

func (m *KvPair) GetKey() []byte

func (*KvPair) GetValue

func (m *KvPair) GetValue() []byte

func (*KvPair) Marshal

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

func (*KvPair) MarshalTo

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

func (*KvPair) ProtoMessage

func (*KvPair) ProtoMessage()

func (*KvPair) Reset

func (m *KvPair) Reset()

func (*KvPair) Size

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

func (*KvPair) String

func (m *KvPair) String() string

func (*KvPair) Unmarshal

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

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

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

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

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

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

func (*Request) GetCmdType

func (m *Request) GetCmdType() CmdType

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

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

func (*Request) MarshalTo

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

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) Size

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

func (*Request) String

func (m *Request) String() string

func (*Request) Unmarshal

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

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

func (*Response) GetCmdType

func (m *Response) GetCmdType() CmdType

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

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

func (*Response) MarshalTo

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

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

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

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

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

Jump to

Keyboard shortcuts

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