msgpb

package
v0.0.0-...-3056823 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package msgpb is a generated protocol buffer package.

It is generated from these files:

msgpb.proto

It has these top-level messages:

Message

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMsgpb = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsgpb   = fmt.Errorf("proto: integer overflow")
)
View Source
var MessageType_name = map[int32]string{
	0: "None",
	1: "Cmd",
	2: "CmdResp",
	3: "Raft",
	4: "KvReq",
	5: "KvResp",
	6: "CopReq",
	7: "CopResp",
	8: "PdReq",
	9: "PdResp",
}
View Source
var MessageType_value = map[string]int32{
	"None":    0,
	"Cmd":     1,
	"CmdResp": 2,
	"Raft":    3,
	"KvReq":   4,
	"KvResp":  5,
	"CopReq":  6,
	"CopResp": 7,
	"PdReq":   8,
	"PdResp":  9,
}

Functions

This section is empty.

Types

type Message

type Message struct {
	MsgType          MessageType                 `protobuf:"varint,1,opt,name=msg_type,enum=msgpb.MessageType" json:"msg_type"`
	CmdReq           *raft_cmdpb.RaftCmdRequest  `protobuf:"bytes,2,opt,name=cmd_req" json:"cmd_req,omitempty"`
	CmdResp          *raft_cmdpb.RaftCmdResponse `protobuf:"bytes,3,opt,name=cmd_resp" json:"cmd_resp,omitempty"`
	Raft             *raft_serverpb.RaftMessage  `protobuf:"bytes,4,opt,name=raft" json:"raft,omitempty"`
	KvReq            *kvrpcpb.Request            `protobuf:"bytes,5,opt,name=kv_req" json:"kv_req,omitempty"`
	KvResp           *kvrpcpb.Response           `protobuf:"bytes,6,opt,name=kv_resp" json:"kv_resp,omitempty"`
	CopReq           *coprocessor.Request        `protobuf:"bytes,7,opt,name=cop_req" json:"cop_req,omitempty"`
	CopResp          *coprocessor.Response       `protobuf:"bytes,8,opt,name=cop_resp" json:"cop_resp,omitempty"`
	PdReq            *pdpb.Request               `protobuf:"bytes,9,opt,name=pd_req" json:"pd_req,omitempty"`
	PdResp           *pdpb.Response              `protobuf:"bytes,10,opt,name=pd_resp" json:"pd_resp,omitempty"`
	XXX_unrecognized []byte                      `json:"-"`
}

Message holds all messages communicating with TiKV.

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

func (*Message) GetCmdReq

func (m *Message) GetCmdReq() *raft_cmdpb.RaftCmdRequest

func (*Message) GetCmdResp

func (m *Message) GetCmdResp() *raft_cmdpb.RaftCmdResponse

func (*Message) GetCopReq

func (m *Message) GetCopReq() *coprocessor.Request

func (*Message) GetCopResp

func (m *Message) GetCopResp() *coprocessor.Response

func (*Message) GetKvReq

func (m *Message) GetKvReq() *kvrpcpb.Request

func (*Message) GetKvResp

func (m *Message) GetKvResp() *kvrpcpb.Response

func (*Message) GetMsgType

func (m *Message) GetMsgType() MessageType

func (*Message) GetPdReq

func (m *Message) GetPdReq() *pdpb.Request

func (*Message) GetPdResp

func (m *Message) GetPdResp() *pdpb.Response

func (*Message) GetRaft

func (m *Message) GetRaft() *raft_serverpb.RaftMessage

func (*Message) Marshal

func (m *Message) Marshal() (data []byte, err error)

func (*Message) MarshalTo

func (m *Message) MarshalTo(data []byte) (int, error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) Size

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

func (*Message) String

func (m *Message) String() string

func (*Message) Unmarshal

func (m *Message) Unmarshal(data []byte) error

type MessageType

type MessageType int32
const (
	MessageType_None    MessageType = 0
	MessageType_Cmd     MessageType = 1
	MessageType_CmdResp MessageType = 2
	MessageType_Raft    MessageType = 3
	MessageType_KvReq   MessageType = 4
	MessageType_KvResp  MessageType = 5
	MessageType_CopReq  MessageType = 6
	MessageType_CopResp MessageType = 7
	MessageType_PdReq   MessageType = 8
	MessageType_PdResp  MessageType = 9
)

func (MessageType) Enum

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor

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

func (MessageType) String

func (x MessageType) String() string

func (*MessageType) UnmarshalJSON

func (x *MessageType) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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