|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// source: message.proto
|
|
|
|
|
|
|
|
package message
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
math "math"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
|
|
|
// ServiceType indicates which service used to generate this message.
|
|
|
|
type ServiceType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
ServiceType_CONSENSUS ServiceType = 0
|
|
|
|
ServiceType_CLIENT_SUPPORT ServiceType = 3
|
|
|
|
)
|
|
|
|
|
|
|
|
var ServiceType_name = map[int32]string{
|
|
|
|
0: "CONSENSUS",
|
|
|
|
3: "CLIENT_SUPPORT",
|
|
|
|
}
|
|
|
|
|
|
|
|
var ServiceType_value = map[string]int32{
|
|
|
|
"CONSENSUS": 0,
|
|
|
|
"CLIENT_SUPPORT": 3,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x ServiceType) String() string {
|
|
|
|
return proto.EnumName(ServiceType_name, int32(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ServiceType) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_33c57e4bae7b9afd, []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
// MessageType indicates what is the type of this message.
|
|
|
|
type MessageType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
MessageType_ANNOUNCE MessageType = 0
|
|
|
|
MessageType_PREPARE MessageType = 1
|
|
|
|
MessageType_PREPARED MessageType = 2
|
|
|
|
MessageType_COMMIT MessageType = 3
|
|
|
|
MessageType_COMMITTED MessageType = 4
|
|
|
|
MessageType_VIEWCHANGE MessageType = 5
|
|
|
|
MessageType_NEWVIEW MessageType = 6
|
|
|
|
)
|
|
|
|
|
|
|
|
var MessageType_name = map[int32]string{
|
|
|
|
0: "ANNOUNCE",
|
|
|
|
1: "PREPARE",
|
|
|
|
2: "PREPARED",
|
|
|
|
3: "COMMIT",
|
|
|
|
4: "COMMITTED",
|
|
|
|
5: "VIEWCHANGE",
|
|
|
|
6: "NEWVIEW",
|
|
|
|
}
|
|
|
|
|
|
|
|
var MessageType_value = map[string]int32{
|
|
|
|
"ANNOUNCE": 0,
|
|
|
|
"PREPARE": 1,
|
|
|
|
"PREPARED": 2,
|
|
|
|
"COMMIT": 3,
|
|
|
|
"COMMITTED": 4,
|
|
|
|
"VIEWCHANGE": 5,
|
|
|
|
"NEWVIEW": 6,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x MessageType) String() string {
|
|
|
|
return proto.EnumName(MessageType_name, int32(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (MessageType) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_33c57e4bae7b9afd, []int{1}
|
|
|
|
}
|
|
|
|
|
|
|
|
// This is universal message for all communication protocols.
|
|
|
|
// There are different Requests for different message types.
|
|
|
|
// As we introduce a new type of message just add a new MessageType and new type of request in Message.
|
|
|
|
//
|
|
|
|
// The request field will be either one of the structure corresponding to the MessageType type.
|
|
|
|
type Message struct {
|
|
|
|
ServiceType ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"`
|
|
|
|
Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"`
|
|
|
|
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
|
|
// Types that are valid to be assigned to Request:
|
|
|
|
// *Message_Consensus
|
|
|
|
// *Message_Viewchange
|
|
|
|
Request isMessage_Request `protobuf_oneof:"request"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Message) ProtoMessage() {}
|
|
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_33c57e4bae7b9afd, []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Message.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *Message) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Message.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Message) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Message.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Message) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Message.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Message proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Message) GetServiceType() ServiceType {
|
|
|
|
if m != nil {
|
|
|
|
return m.ServiceType
|
|
|
|
}
|
|
|
|
return ServiceType_CONSENSUS
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) GetType() MessageType {
|
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return MessageType_ANNOUNCE
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) GetSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type isMessage_Request interface {
|
|
|
|
isMessage_Request()
|
|
|
|
}
|
|
|
|
|
|
|
|
type Message_Consensus struct {
|
|
|
|
Consensus *ConsensusRequest `protobuf:"bytes,4,opt,name=consensus,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Message_Viewchange struct {
|
|
|
|
Viewchange *ViewChangeRequest `protobuf:"bytes,5,opt,name=viewchange,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*Message_Consensus) isMessage_Request() {}
|
|
|
|
|
|
|
|
func (*Message_Viewchange) isMessage_Request() {}
|
|
|
|
|
|
|
|
func (m *Message) GetRequest() isMessage_Request {
|
|
|
|
if m != nil {
|
|
|
|
return m.Request
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) GetConsensus() *ConsensusRequest {
|
|
|
|
if x, ok := m.GetRequest().(*Message_Consensus); ok {
|
|
|
|
return x.Consensus
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) GetViewchange() *ViewChangeRequest {
|
|
|
|
if x, ok := m.GetRequest().(*Message_Viewchange); ok {
|
|
|
|
return x.Viewchange
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
|
|
func (*Message) XXX_OneofWrappers() []interface{} {
|
|
|
|
return []interface{}{
|
|
|
|
(*Message_Consensus)(nil),
|
|
|
|
(*Message_Viewchange)(nil),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Response struct {
|
|
|
|
ServiceType ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=message.ServiceType" json:"service_type,omitempty"`
|
|
|
|
Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=message.MessageType" json:"type,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Response) Reset() { *m = Response{} }
|
|
|
|
func (m *Response) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Response) ProtoMessage() {}
|
|
|
|
func (*Response) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_33c57e4bae7b9afd, []int{1}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Response) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Response.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Response.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *Response) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Response.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Response) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Response.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Response) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Response.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Response proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Response) GetServiceType() ServiceType {
|
|
|
|
if m != nil {
|
|
|
|
return m.ServiceType
|
|
|
|
}
|
|
|
|
return ServiceType_CONSENSUS
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Response) GetType() MessageType {
|
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return MessageType_ANNOUNCE
|
|
|
|
}
|
|
|
|
|
|
|
|
type ConsensusRequest struct {
|
|
|
|
ViewId uint64 `protobuf:"varint,1,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"`
|
|
|
|
BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"`
|
|
|
|
ShardId uint32 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
|
|
|
|
BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
|
|
|
|
Block []byte `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"`
|
|
|
|
SenderPubkey []byte `protobuf:"bytes,6,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"`
|
|
|
|
Payload []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) Reset() { *m = ConsensusRequest{} }
|
|
|
|
func (m *ConsensusRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ConsensusRequest) ProtoMessage() {}
|
|
|
|
func (*ConsensusRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_33c57e4bae7b9afd, []int{2}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ConsensusRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ConsensusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ConsensusRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *ConsensusRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ConsensusRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *ConsensusRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ConsensusRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ConsensusRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ConsensusRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ConsensusRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) GetViewId() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ViewId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) GetBlockNum() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.BlockNum
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) GetShardId() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ShardId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) GetBlockHash() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.BlockHash
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) GetBlock() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Block
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) GetSenderPubkey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SenderPubkey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConsensusRequest) GetPayload() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ViewChangeRequest struct {
|
|
|
|
ViewId uint64 `protobuf:"varint,1,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"`
|
|
|
|
BlockNum uint64 `protobuf:"varint,2,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"`
|
|
|
|
ShardId uint32 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
|
|
|
|
SenderPubkey []byte `protobuf:"bytes,4,opt,name=sender_pubkey,json=senderPubkey,proto3" json:"sender_pubkey,omitempty"`
|
|
|
|
LeaderPubkey []byte `protobuf:"bytes,5,opt,name=leader_pubkey,json=leaderPubkey,proto3" json:"leader_pubkey,omitempty"`
|
|
|
|
Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
|
|
ViewchangeSig []byte `protobuf:"bytes,7,opt,name=viewchange_sig,json=viewchangeSig,proto3" json:"viewchange_sig,omitempty"`
|
|
|
|
ViewidSig []byte `protobuf:"bytes,8,opt,name=viewid_sig,json=viewidSig,proto3" json:"viewid_sig,omitempty"`
|
|
|
|
// below is for newview message only
|
|
|
|
// only need 1 valid m1 type message which is in payload
|
|
|
|
M2Aggsigs []byte `protobuf:"bytes,9,opt,name=m2_aggsigs,json=m2Aggsigs,proto3" json:"m2_aggsigs,omitempty"`
|
|
|
|
M2Bitmap []byte `protobuf:"bytes,10,opt,name=m2_bitmap,json=m2Bitmap,proto3" json:"m2_bitmap,omitempty"`
|
|
|
|
M3Aggsigs []byte `protobuf:"bytes,11,opt,name=m3_aggsigs,json=m3Aggsigs,proto3" json:"m3_aggsigs,omitempty"`
|
|
|
|
M3Bitmap []byte `protobuf:"bytes,12,opt,name=m3_bitmap,json=m3Bitmap,proto3" json:"m3_bitmap,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) Reset() { *m = ViewChangeRequest{} }
|
|
|
|
func (m *ViewChangeRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ViewChangeRequest) ProtoMessage() {}
|
|
|
|
func (*ViewChangeRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_33c57e4bae7b9afd, []int{3}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ViewChangeRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ViewChangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ViewChangeRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *ViewChangeRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ViewChangeRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *ViewChangeRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ViewChangeRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ViewChangeRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ViewChangeRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ViewChangeRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetViewId() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ViewId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetBlockNum() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.BlockNum
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetShardId() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ShardId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetSenderPubkey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SenderPubkey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetLeaderPubkey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.LeaderPubkey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetPayload() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetViewchangeSig() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.ViewchangeSig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetViewidSig() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.ViewidSig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetM2Aggsigs() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.M2Aggsigs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetM2Bitmap() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.M2Bitmap
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetM3Aggsigs() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.M3Aggsigs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ViewChangeRequest) GetM3Bitmap() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.M3Bitmap
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterEnum("message.ServiceType", ServiceType_name, ServiceType_value)
|
|
|
|
proto.RegisterEnum("message.MessageType", MessageType_name, MessageType_value)
|
|
|
|
proto.RegisterType((*Message)(nil), "message.Message")
|
|
|
|
proto.RegisterType((*Response)(nil), "message.Response")
|
|
|
|
proto.RegisterType((*ConsensusRequest)(nil), "message.ConsensusRequest")
|
|
|
|
proto.RegisterType((*ViewChangeRequest)(nil), "message.ViewChangeRequest")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) }
|
|
|
|
|
|
|
|
var fileDescriptor_33c57e4bae7b9afd = []byte{
|
|
|
|
// 600 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6e, 0x9b, 0x4c,
|
|
|
|
0x14, 0xc5, 0xed, 0xd8, 0x31, 0xe6, 0x02, 0x16, 0x19, 0x45, 0xfa, 0x48, 0xbe, 0x56, 0x8a, 0x1c,
|
|
|
|
0x55, 0xb2, 0xb2, 0x88, 0x22, 0xbc, 0xa8, 0x2a, 0x75, 0xe3, 0x10, 0xd4, 0x58, 0x6a, 0x30, 0x1a,
|
|
|
|
0x9c, 0x64, 0x89, 0xb0, 0x19, 0x61, 0x14, 0xf3, 0xa7, 0x0c, 0x24, 0xf2, 0x0b, 0x74, 0xd9, 0xd7,
|
|
|
|
0xeb, 0xeb, 0x54, 0x33, 0x83, 0x8d, 0x9b, 0x74, 0x59, 0x75, 0xc7, 0x39, 0xe7, 0xfe, 0x2e, 0x73,
|
|
|
|
0xaf, 0x06, 0x40, 0x4b, 0x08, 0xa5, 0x41, 0x44, 0x2e, 0xf3, 0x22, 0x2b, 0x33, 0x24, 0xd5, 0x72,
|
|
|
|
0xf8, 0xe3, 0x00, 0xa4, 0x3b, 0xf1, 0x8c, 0x3e, 0x82, 0x4a, 0x49, 0xf1, 0x1c, 0x2f, 0x89, 0x5f,
|
|
|
|
0x6e, 0x72, 0x62, 0xb4, 0xc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0x81, 0x6c, 0xcd, 0x1c, 0xcf, 0x76, 0xbc, 0x7b,
|
|
|
|
0x4f, 0x6f, 0x21, 0x04, 0x03, 0xeb, 0xeb, 0xd4, 0x76, 0xe6, 0xbe, 0x77, 0xef, 0xba, 0x33, 0x3c,
|
|
|
|
0xd7, 0x3b, 0x17, 0x29, 0x28, 0x7b, 0x37, 0x15, 0xa9, 0xd0, 0x9f, 0x38, 0xce, 0xec, 0xde, 0xb1,
|
|
|
|
0x6c, 0xbd, 0x85, 0x14, 0x90, 0x5c, 0x6c, 0xbb, 0x13, 0x6c, 0xeb, 0x6d, 0x16, 0xd5, 0xe2, 0x46,
|
|
|
|
0x3f, 0x40, 0x00, 0x3d, 0x6b, 0x76, 0x77, 0x37, 0x9d, 0xeb, 0x1d, 0xf1, 0x1a, 0xf6, 0x3c, 0xb7,
|
|
|
|
0x6f, 0xf4, 0x2e, 0x1a, 0x00, 0x3c, 0x4c, 0xed, 0x47, 0xeb, 0x76, 0xe2, 0x7c, 0xb1, 0xf5, 0x43,
|
|
|
|
0xd6, 0xc5, 0xb1, 0x1f, 0x99, 0xa5, 0xf7, 0xcc, 0x09, 0x68, 0xd6, 0x3a, 0x26, 0x69, 0x59, 0x9f,
|
|
|
|
0x13, 0x5d, 0x81, 0xe4, 0x16, 0xd9, 0x92, 0x50, 0x8a, 0xf4, 0xd7, 0x1f, 0xcf, 0xe9, 0xd1, 0xce,
|
|
|
|
0xd9, 0x7e, 0xa8, 0xc3, 0xd6, 0xa2, 0xc7, 0xff, 0x6b, 0xe3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff,
|
|
|
|
0x0d, 0xda, 0x2f, 0x7d, 0xe8, 0x04, 0x00, 0x00,
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
|
|
|
// ClientServiceClient is the client API for ClientService service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type ClientServiceClient interface {
|
|
|
|
Process(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Response, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type clientServiceClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewClientServiceClient(cc *grpc.ClientConn) ClientServiceClient {
|
|
|
|
return &clientServiceClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *clientServiceClient) Process(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Response, error) {
|
|
|
|
out := new(Response)
|
|
|
|
err := c.cc.Invoke(ctx, "/message.ClientService/Process", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// ClientServiceServer is the server API for ClientService service.
|
|
|
|
type ClientServiceServer interface {
|
|
|
|
Process(context.Context, *Message) (*Response, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnimplementedClientServiceServer can be embedded to have forward compatible implementations.
|
|
|
|
type UnimplementedClientServiceServer struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UnimplementedClientServiceServer) Process(ctx context.Context, req *Message) (*Response, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Process not implemented")
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterClientServiceServer(s *grpc.Server, srv ClientServiceServer) {
|
|
|
|
s.RegisterService(&_ClientService_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _ClientService_Process_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(Message)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ClientServiceServer).Process(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/message.ClientService/Process",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ClientServiceServer).Process(ctx, req.(*Message))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ClientService_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "message.ClientService",
|
|
|
|
HandlerType: (*ClientServiceServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Process",
|
|
|
|
Handler: _ClientService_Process_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "message.proto",
|
|
|
|
}
|