|
|
@@ -3,7 +3,7 @@
|
|
|
// DO NOT EDIT!
|
|
|
|
|
|
/*
|
|
|
- Package raftis a generated protocol buffer package.
|
|
|
+ Package raftpb is a generated protocol buffer package.
|
|
|
|
|
|
It is generated from these files:
|
|
|
raft.proto
|
|
|
@@ -20,7 +20,7 @@ import proto "code.google.com/p/gogoprotobuf/proto"
|
|
|
import json "encoding/json"
|
|
|
import math "math"
|
|
|
|
|
|
-// discarding unused import gogoproto "code.google.com/p/gogoprotobuf/gogoproto/gogo.
|
|
|
+// discarding unused import gogoproto "code.google.com/p/gogoprotobuf/gogoproto/gogo.pb"
|
|
|
|
|
|
import io "io"
|
|
|
import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto"
|
|
|
@@ -35,7 +35,6 @@ type Entry struct {
|
|
|
Term int64 `protobuf:"varint,2,req,name=term" json:"term"`
|
|
|
Index int64 `protobuf:"varint,3,req,name=index" json:"index"`
|
|
|
Data []byte `protobuf:"bytes,4,opt,name=data" json:"data"`
|
|
|
- Id int64 `protobuf:"varint,5,req,name=id" json:"id"`
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
}
|
|
|
|
|
|
@@ -56,16 +55,16 @@ func (m *Snapshot) String() string { return proto.CompactTextString(m) }
|
|
|
func (*Snapshot) ProtoMessage() {}
|
|
|
|
|
|
type Message struct {
|
|
|
- Type int64 `protobuf:"varint,1,req,name=type" json:"type"`
|
|
|
- To int64 `protobuf:"varint,2,req,name=to" json:"to"`
|
|
|
- From int64 `protobuf:"varint,3,req,name=from" json:"from"`
|
|
|
- Term int64 `protobuf:"varint,4,req,name=term" json:"term"`
|
|
|
- LogTerm int64 `protobuf:"varint,5,req,name=logTerm" json:"logTerm"`
|
|
|
- Index int64 `protobuf:"varint,6,req,name=index" json:"index"`
|
|
|
- Entries []Entry `protobuf:"bytes,7,rep,name=entries" json:"entries"`
|
|
|
- Commit int64 `protobuf:"varint,8,req,name=commit" json:"commit"`
|
|
|
- Snapshot Snapshot `protobuf:"bytes,9,req,name=snapshot" json:"snapshot"`
|
|
|
- XXX_unrecognized []byte `json:"-"`
|
|
|
+ Type int64 `protobuf:"varint,1,req,name=type" json:"type"`
|
|
|
+ To int64 `protobuf:"varint,2,req,name=to" json:"to"`
|
|
|
+ From int64 `protobuf:"varint,3,req,name=from" json:"from"`
|
|
|
+ Term int64 `protobuf:"varint,4,req,name=term" json:"term"`
|
|
|
+ LogTerm int64 `protobuf:"varint,5,req,name=logTerm" json:"logTerm"`
|
|
|
+ Index int64 `protobuf:"varint,6,req,name=index" json:"index"`
|
|
|
+ Entries []Entry `protobuf:"bytes,7,rep,name=entries" json:"entries"`
|
|
|
+ Commit int64 `protobuf:"varint,8,req,name=commit" json:"commit"`
|
|
|
+ Snapshot Snapshot `protobuf:"bytes,9,req,name=snapshot" json:"snapshot"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
}
|
|
|
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
|
@@ -172,21 +171,6 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
}
|
|
|
m.Data = append(m.Data, data[index:postIndex]...)
|
|
|
index = postIndex
|
|
|
- case 5:
|
|
|
- if wireType != 0 {
|
|
|
- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
|
|
|
- }
|
|
|
- for shift := uint(0); ; shift += 7 {
|
|
|
- if index >= l {
|
|
|
- return io.ErrUnexpectedEOF
|
|
|
- }
|
|
|
- b := data[index]
|
|
|
- index++
|
|
|
- m.Id |= (int64(b) & 0x7F) << shift
|
|
|
- if b < 0x80 {
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
default:
|
|
|
var sizeOfWire int
|
|
|
for {
|
|
|
@@ -625,7 +609,6 @@ func (m *Entry) Size() (n int) {
|
|
|
n += 1 + sovRaft(uint64(m.Index))
|
|
|
l = len(m.Data)
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
- n += 1 + sovRaft(uint64(m.Id))
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
}
|
|
|
@@ -725,9 +708,6 @@ func (m *Entry) MarshalTo(data []byte) (n int, err error) {
|
|
|
i++
|
|
|
i = encodeVarintRaft(data, i, uint64(len(m.Data)))
|
|
|
i += copy(data[i:], m.Data)
|
|
|
- data[i] = 0x28
|
|
|
- i++
|
|
|
- i = encodeVarintRaft(data, i, uint64(m.Id))
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
i += copy(data[i:], m.XXX_unrecognized)
|
|
|
}
|