2017-12-07 04:40:46 +03:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2014-08-28 05:53:18 +04:00
|
|
|
// source: raft.proto
|
2014-08-28 04:53:36 +04:00
|
|
|
|
|
|
|
/*
|
2014-08-29 03:41:42 +04:00
|
|
|
Package raftpb is a generated protocol buffer package.
|
2014-08-28 04:53:36 +04:00
|
|
|
|
|
|
|
It is generated from these files:
|
2014-08-28 05:53:18 +04:00
|
|
|
raft.proto
|
2014-08-28 04:53:36 +04:00
|
|
|
|
|
|
|
It has these top-level messages:
|
|
|
|
Entry
|
2014-11-20 00:17:50 +03:00
|
|
|
SnapshotMetadata
|
2014-08-28 04:53:36 +04:00
|
|
|
Snapshot
|
|
|
|
Message
|
2014-09-16 04:35:02 +04:00
|
|
|
HardState
|
2014-11-20 00:17:50 +03:00
|
|
|
ConfState
|
2014-09-23 23:02:44 +04:00
|
|
|
ConfChange
|
2014-08-28 04:53:36 +04:00
|
|
|
*/
|
2014-08-28 05:53:18 +04:00
|
|
|
package raftpb
|
2014-08-28 04:53:36 +04:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2016-07-18 19:33:32 +03:00
|
|
|
proto "github.com/golang/protobuf/proto"
|
2014-08-28 04:53:36 +04:00
|
|
|
|
2016-04-14 02:23:07 +03:00
|
|
|
math "math"
|
2016-04-12 17:48:47 +03:00
|
|
|
|
2017-12-07 04:40:46 +03:00
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
|
2016-10-04 00:43:06 +03:00
|
|
|
io "io"
|
|
|
|
)
|
2014-08-28 04:53:36 +04:00
|
|
|
|
2015-03-25 20:02:00 +03:00
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
2014-08-28 04:53:36 +04:00
|
|
|
var _ = proto.Marshal
|
2016-01-27 04:41:39 +03:00
|
|
|
var _ = fmt.Errorf
|
2014-08-28 04:53:36 +04:00
|
|
|
var _ = math.Inf
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
2016-11-10 22:53:48 +03:00
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
2016-04-26 00:08:33 +03:00
|
|
|
|
2014-09-21 09:48:17 +04:00
|
|
|
type EntryType int32
|
|
|
|
|
|
|
|
const (
|
2014-09-23 23:02:44 +04:00
|
|
|
EntryNormal EntryType = 0
|
|
|
|
EntryConfChange EntryType = 1
|
2014-09-21 09:48:17 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
var EntryType_name = map[int32]string{
|
|
|
|
0: "EntryNormal",
|
2014-09-23 23:02:44 +04:00
|
|
|
1: "EntryConfChange",
|
2014-09-21 09:48:17 +04:00
|
|
|
}
|
|
|
|
var EntryType_value = map[string]int32{
|
2014-09-23 23:02:44 +04:00
|
|
|
"EntryNormal": 0,
|
|
|
|
"EntryConfChange": 1,
|
2014-09-21 09:48:17 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x EntryType) Enum() *EntryType {
|
|
|
|
p := new(EntryType)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
func (x EntryType) String() string {
|
|
|
|
return proto.EnumName(EntryType_name, int32(x))
|
|
|
|
}
|
|
|
|
func (x *EntryType) UnmarshalJSON(data []byte) error {
|
|
|
|
value, err := proto.UnmarshalJSONEnum(EntryType_value, data, "EntryType")
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
*x = EntryType(value)
|
|
|
|
return nil
|
|
|
|
}
|
2016-04-26 00:08:33 +03:00
|
|
|
func (EntryType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRaft, []int{0} }
|
2014-09-21 09:48:17 +04:00
|
|
|
|
2014-10-12 11:34:22 +04:00
|
|
|
type MessageType int32
|
|
|
|
|
|
|
|
const (
|
2016-03-24 14:59:41 +03:00
|
|
|
MsgHup MessageType = 0
|
|
|
|
MsgBeat MessageType = 1
|
|
|
|
MsgProp MessageType = 2
|
|
|
|
MsgApp MessageType = 3
|
|
|
|
MsgAppResp MessageType = 4
|
|
|
|
MsgVote MessageType = 5
|
|
|
|
MsgVoteResp MessageType = 6
|
|
|
|
MsgSnap MessageType = 7
|
|
|
|
MsgHeartbeat MessageType = 8
|
|
|
|
MsgHeartbeatResp MessageType = 9
|
|
|
|
MsgUnreachable MessageType = 10
|
|
|
|
MsgSnapStatus MessageType = 11
|
|
|
|
MsgCheckQuorum MessageType = 12
|
|
|
|
MsgTransferLeader MessageType = 13
|
|
|
|
MsgTimeoutNow MessageType = 14
|
2016-06-03 18:20:10 +03:00
|
|
|
MsgReadIndex MessageType = 15
|
|
|
|
MsgReadIndexResp MessageType = 16
|
2016-10-10 09:32:40 +03:00
|
|
|
MsgPreVote MessageType = 17
|
|
|
|
MsgPreVoteResp MessageType = 18
|
2014-10-12 11:34:22 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
var MessageType_name = map[int32]string{
|
2015-02-05 01:41:14 +03:00
|
|
|
0: "MsgHup",
|
|
|
|
1: "MsgBeat",
|
|
|
|
2: "MsgProp",
|
|
|
|
3: "MsgApp",
|
|
|
|
4: "MsgAppResp",
|
|
|
|
5: "MsgVote",
|
|
|
|
6: "MsgVoteResp",
|
|
|
|
7: "MsgSnap",
|
|
|
|
8: "MsgHeartbeat",
|
|
|
|
9: "MsgHeartbeatResp",
|
|
|
|
10: "MsgUnreachable",
|
2015-02-25 08:38:18 +03:00
|
|
|
11: "MsgSnapStatus",
|
2015-11-24 08:59:25 +03:00
|
|
|
12: "MsgCheckQuorum",
|
2016-03-24 14:59:41 +03:00
|
|
|
13: "MsgTransferLeader",
|
|
|
|
14: "MsgTimeoutNow",
|
2016-06-03 18:20:10 +03:00
|
|
|
15: "MsgReadIndex",
|
|
|
|
16: "MsgReadIndexResp",
|
2016-10-10 09:32:40 +03:00
|
|
|
17: "MsgPreVote",
|
|
|
|
18: "MsgPreVoteResp",
|
2014-10-12 11:34:22 +04:00
|
|
|
}
|
|
|
|
var MessageType_value = map[string]int32{
|
2016-03-24 14:59:41 +03:00
|
|
|
"MsgHup": 0,
|
|
|
|
"MsgBeat": 1,
|
|
|
|
"MsgProp": 2,
|
|
|
|
"MsgApp": 3,
|
|
|
|
"MsgAppResp": 4,
|
|
|
|
"MsgVote": 5,
|
|
|
|
"MsgVoteResp": 6,
|
|
|
|
"MsgSnap": 7,
|
|
|
|
"MsgHeartbeat": 8,
|
|
|
|
"MsgHeartbeatResp": 9,
|
|
|
|
"MsgUnreachable": 10,
|
|
|
|
"MsgSnapStatus": 11,
|
|
|
|
"MsgCheckQuorum": 12,
|
|
|
|
"MsgTransferLeader": 13,
|
|
|
|
"MsgTimeoutNow": 14,
|
2016-06-03 18:20:10 +03:00
|
|
|
"MsgReadIndex": 15,
|
|
|
|
"MsgReadIndexResp": 16,
|
2016-10-10 09:32:40 +03:00
|
|
|
"MsgPreVote": 17,
|
|
|
|
"MsgPreVoteResp": 18,
|
2014-10-12 11:34:22 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x MessageType) Enum() *MessageType {
|
|
|
|
p := new(MessageType)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
func (x MessageType) String() string {
|
|
|
|
return proto.EnumName(MessageType_name, int32(x))
|
|
|
|
}
|
|
|
|
func (x *MessageType) UnmarshalJSON(data []byte) error {
|
|
|
|
value, err := proto.UnmarshalJSONEnum(MessageType_value, data, "MessageType")
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
*x = MessageType(value)
|
|
|
|
return nil
|
|
|
|
}
|
2016-04-26 00:08:33 +03:00
|
|
|
func (MessageType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRaft, []int{1} }
|
2014-10-12 11:34:22 +04:00
|
|
|
|
2014-09-23 23:02:44 +04:00
|
|
|
type ConfChangeType int32
|
2014-09-23 01:38:21 +04:00
|
|
|
|
|
|
|
const (
|
2017-11-11 05:38:21 +03:00
|
|
|
ConfChangeAddNode ConfChangeType = 0
|
|
|
|
ConfChangeRemoveNode ConfChangeType = 1
|
|
|
|
ConfChangeUpdateNode ConfChangeType = 2
|
|
|
|
ConfChangeAddLearnerNode ConfChangeType = 3
|
2014-09-23 01:38:21 +04:00
|
|
|
)
|
|
|
|
|
2014-09-23 23:02:44 +04:00
|
|
|
var ConfChangeType_name = map[int32]string{
|
|
|
|
0: "ConfChangeAddNode",
|
|
|
|
1: "ConfChangeRemoveNode",
|
2014-11-11 22:46:49 +03:00
|
|
|
2: "ConfChangeUpdateNode",
|
2017-11-11 05:38:21 +03:00
|
|
|
3: "ConfChangeAddLearnerNode",
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
2014-09-23 23:02:44 +04:00
|
|
|
var ConfChangeType_value = map[string]int32{
|
2017-11-11 05:38:21 +03:00
|
|
|
"ConfChangeAddNode": 0,
|
|
|
|
"ConfChangeRemoveNode": 1,
|
|
|
|
"ConfChangeUpdateNode": 2,
|
|
|
|
"ConfChangeAddLearnerNode": 3,
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
|
|
|
|
2014-09-23 23:02:44 +04:00
|
|
|
func (x ConfChangeType) Enum() *ConfChangeType {
|
|
|
|
p := new(ConfChangeType)
|
2014-09-23 01:38:21 +04:00
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
2014-09-23 23:02:44 +04:00
|
|
|
func (x ConfChangeType) String() string {
|
|
|
|
return proto.EnumName(ConfChangeType_name, int32(x))
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
2014-09-23 23:02:44 +04:00
|
|
|
func (x *ConfChangeType) UnmarshalJSON(data []byte) error {
|
|
|
|
value, err := proto.UnmarshalJSONEnum(ConfChangeType_value, data, "ConfChangeType")
|
2014-09-23 01:38:21 +04:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2014-09-23 23:02:44 +04:00
|
|
|
*x = ConfChangeType(value)
|
2014-09-23 01:38:21 +04:00
|
|
|
return nil
|
|
|
|
}
|
2016-04-26 00:08:33 +03:00
|
|
|
func (ConfChangeType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRaft, []int{2} }
|
2014-09-23 01:38:21 +04:00
|
|
|
|
2014-08-28 04:53:36 +04:00
|
|
|
type Entry struct {
|
2016-11-09 03:43:21 +03:00
|
|
|
Term uint64 `protobuf:"varint,2,opt,name=Term" json:"Term"`
|
|
|
|
Index uint64 `protobuf:"varint,3,opt,name=Index" json:"Index"`
|
|
|
|
Type EntryType `protobuf:"varint,1,opt,name=Type,enum=raftpb.EntryType" json:"Type"`
|
|
|
|
Data []byte `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"`
|
2014-09-21 09:48:17 +04:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
func (m *Entry) Reset() { *m = Entry{} }
|
|
|
|
func (m *Entry) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Entry) ProtoMessage() {}
|
|
|
|
func (*Entry) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{0} }
|
2014-08-28 04:53:36 +04:00
|
|
|
|
2014-11-20 00:17:50 +03:00
|
|
|
type SnapshotMetadata struct {
|
2016-05-03 09:02:31 +03:00
|
|
|
ConfState ConfState `protobuf:"bytes,1,opt,name=conf_state,json=confState" json:"conf_state"`
|
2015-06-30 04:37:52 +03:00
|
|
|
Index uint64 `protobuf:"varint,2,opt,name=index" json:"index"`
|
|
|
|
Term uint64 `protobuf:"varint,3,opt,name=term" json:"term"`
|
2014-11-20 00:17:50 +03:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
func (m *SnapshotMetadata) Reset() { *m = SnapshotMetadata{} }
|
|
|
|
func (m *SnapshotMetadata) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SnapshotMetadata) ProtoMessage() {}
|
|
|
|
func (*SnapshotMetadata) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{1} }
|
2014-11-20 00:17:50 +03:00
|
|
|
|
2014-08-28 04:53:36 +04:00
|
|
|
type Snapshot struct {
|
2015-06-30 04:37:52 +03:00
|
|
|
Data []byte `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
|
|
|
|
Metadata SnapshotMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"`
|
2014-11-20 00:17:50 +03:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
func (m *Snapshot) Reset() { *m = Snapshot{} }
|
|
|
|
func (m *Snapshot) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Snapshot) ProtoMessage() {}
|
|
|
|
func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{2} }
|
2014-08-28 04:53:36 +04:00
|
|
|
|
|
|
|
type Message struct {
|
2015-06-30 04:37:52 +03:00
|
|
|
Type MessageType `protobuf:"varint,1,opt,name=type,enum=raftpb.MessageType" json:"type"`
|
|
|
|
To uint64 `protobuf:"varint,2,opt,name=to" json:"to"`
|
|
|
|
From uint64 `protobuf:"varint,3,opt,name=from" json:"from"`
|
|
|
|
Term uint64 `protobuf:"varint,4,opt,name=term" json:"term"`
|
|
|
|
LogTerm uint64 `protobuf:"varint,5,opt,name=logTerm" json:"logTerm"`
|
|
|
|
Index uint64 `protobuf:"varint,6,opt,name=index" json:"index"`
|
2014-10-12 11:34:22 +04:00
|
|
|
Entries []Entry `protobuf:"bytes,7,rep,name=entries" json:"entries"`
|
2015-06-30 04:37:52 +03:00
|
|
|
Commit uint64 `protobuf:"varint,8,opt,name=commit" json:"commit"`
|
|
|
|
Snapshot Snapshot `protobuf:"bytes,9,opt,name=snapshot" json:"snapshot"`
|
|
|
|
Reject bool `protobuf:"varint,10,opt,name=reject" json:"reject"`
|
|
|
|
RejectHint uint64 `protobuf:"varint,11,opt,name=rejectHint" json:"rejectHint"`
|
2016-07-12 11:14:06 +03:00
|
|
|
Context []byte `protobuf:"bytes,12,opt,name=context" json:"context,omitempty"`
|
2014-10-12 11:34:22 +04:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Message) ProtoMessage() {}
|
|
|
|
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{3} }
|
2014-08-28 04:53:36 +04:00
|
|
|
|
2014-09-16 04:35:02 +04:00
|
|
|
type HardState struct {
|
2015-06-30 04:37:52 +03:00
|
|
|
Term uint64 `protobuf:"varint,1,opt,name=term" json:"term"`
|
|
|
|
Vote uint64 `protobuf:"varint,2,opt,name=vote" json:"vote"`
|
|
|
|
Commit uint64 `protobuf:"varint,3,opt,name=commit" json:"commit"`
|
2014-08-28 05:53:18 +04:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
func (m *HardState) Reset() { *m = HardState{} }
|
|
|
|
func (m *HardState) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*HardState) ProtoMessage() {}
|
|
|
|
func (*HardState) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{4} }
|
2014-08-28 05:53:18 +04:00
|
|
|
|
2014-11-20 00:17:50 +03:00
|
|
|
type ConfState struct {
|
2015-06-30 04:37:52 +03:00
|
|
|
Nodes []uint64 `protobuf:"varint,1,rep,name=nodes" json:"nodes,omitempty"`
|
2017-11-11 05:38:21 +03:00
|
|
|
Learners []uint64 `protobuf:"varint,2,rep,name=learners" json:"learners,omitempty"`
|
2014-11-20 00:17:50 +03:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
}
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
func (m *ConfState) Reset() { *m = ConfState{} }
|
|
|
|
func (m *ConfState) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ConfState) ProtoMessage() {}
|
|
|
|
func (*ConfState) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{5} }
|
2014-11-20 00:17:50 +03:00
|
|
|
|
2014-09-23 23:02:44 +04:00
|
|
|
type ConfChange struct {
|
2016-11-09 03:43:21 +03:00
|
|
|
ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"`
|
|
|
|
Type ConfChangeType `protobuf:"varint,2,opt,name=Type,enum=raftpb.ConfChangeType" json:"Type"`
|
|
|
|
NodeID uint64 `protobuf:"varint,3,opt,name=NodeID" json:"NodeID"`
|
|
|
|
Context []byte `protobuf:"bytes,4,opt,name=Context" json:"Context,omitempty"`
|
2014-09-23 23:02:44 +04:00
|
|
|
XXX_unrecognized []byte `json:"-"`
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
func (m *ConfChange) Reset() { *m = ConfChange{} }
|
|
|
|
func (m *ConfChange) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ConfChange) ProtoMessage() {}
|
|
|
|
func (*ConfChange) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{6} }
|
2014-09-23 01:38:21 +04:00
|
|
|
|
2014-08-28 04:53:36 +04:00
|
|
|
func init() {
|
2016-01-27 04:41:39 +03:00
|
|
|
proto.RegisterType((*Entry)(nil), "raftpb.Entry")
|
|
|
|
proto.RegisterType((*SnapshotMetadata)(nil), "raftpb.SnapshotMetadata")
|
|
|
|
proto.RegisterType((*Snapshot)(nil), "raftpb.Snapshot")
|
|
|
|
proto.RegisterType((*Message)(nil), "raftpb.Message")
|
|
|
|
proto.RegisterType((*HardState)(nil), "raftpb.HardState")
|
|
|
|
proto.RegisterType((*ConfState)(nil), "raftpb.ConfState")
|
|
|
|
proto.RegisterType((*ConfChange)(nil), "raftpb.ConfChange")
|
2014-09-21 09:48:17 +04:00
|
|
|
proto.RegisterEnum("raftpb.EntryType", EntryType_name, EntryType_value)
|
2014-10-12 11:34:22 +04:00
|
|
|
proto.RegisterEnum("raftpb.MessageType", MessageType_name, MessageType_value)
|
2014-09-23 23:02:44 +04:00
|
|
|
proto.RegisterEnum("raftpb.ConfChangeType", ConfChangeType_name, ConfChangeType_value)
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Entry) Marshal() (dAtA []byte, err error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
size := m.Size()
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
return dAtA[:n], nil
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Entry) MarshalTo(dAtA []byte) (int, error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x8
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Type))
|
|
|
|
dAtA[i] = 0x10
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Term))
|
|
|
|
dAtA[i] = 0x18
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Index))
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.Data != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x22
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(len(m.Data)))
|
|
|
|
i += copy(dAtA[i:], m.Data)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
if m.XXX_unrecognized != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *SnapshotMetadata) Marshal() (dAtA []byte, err error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
size := m.Size()
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
return dAtA[:n], nil
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *SnapshotMetadata) MarshalTo(dAtA []byte) (int, error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0xa
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.ConfState.Size()))
|
|
|
|
n1, err := m.ConfState.MarshalTo(dAtA[i:])
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n1
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x10
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Index))
|
|
|
|
dAtA[i] = 0x18
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Term))
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.XXX_unrecognized != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Snapshot) Marshal() (dAtA []byte, err error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
size := m.Size()
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
return dAtA[:n], nil
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Data != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0xa
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(len(m.Data)))
|
|
|
|
i += copy(dAtA[i:], m.Data)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x12
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Metadata.Size()))
|
|
|
|
n2, err := m.Metadata.MarshalTo(dAtA[i:])
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n2
|
|
|
|
if m.XXX_unrecognized != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Message) Marshal() (dAtA []byte, err error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
size := m.Size()
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
return dAtA[:n], nil
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Message) MarshalTo(dAtA []byte) (int, error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x8
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Type))
|
|
|
|
dAtA[i] = 0x10
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.To))
|
|
|
|
dAtA[i] = 0x18
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.From))
|
|
|
|
dAtA[i] = 0x20
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Term))
|
|
|
|
dAtA[i] = 0x28
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.LogTerm))
|
|
|
|
dAtA[i] = 0x30
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Index))
|
2015-09-04 01:32:25 +03:00
|
|
|
if len(m.Entries) > 0 {
|
|
|
|
for _, msg := range m.Entries {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x3a
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(msg.Size()))
|
|
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
2014-08-28 04:53:36 +04:00
|
|
|
if err != nil {
|
2015-09-04 01:32:25 +03:00
|
|
|
return 0, err
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
i += n
|
|
|
|
}
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x40
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Commit))
|
|
|
|
dAtA[i] = 0x4a
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Snapshot.Size()))
|
|
|
|
n3, err := m.Snapshot.MarshalTo(dAtA[i:])
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n3
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x50
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
|
|
|
if m.Reject {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 1
|
2015-09-04 01:32:25 +03:00
|
|
|
} else {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x58
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.RejectHint))
|
2016-07-12 11:14:06 +03:00
|
|
|
if m.Context != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x62
|
2016-07-12 11:14:06 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(len(m.Context)))
|
|
|
|
i += copy(dAtA[i:], m.Context)
|
2016-07-12 11:14:06 +03:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.XXX_unrecognized != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *HardState) Marshal() (dAtA []byte, err error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
size := m.Size()
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
return dAtA[:n], nil
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *HardState) MarshalTo(dAtA []byte) (int, error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x8
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Term))
|
|
|
|
dAtA[i] = 0x10
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Vote))
|
|
|
|
dAtA[i] = 0x18
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Commit))
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.XXX_unrecognized != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *ConfState) Marshal() (dAtA []byte, err error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
size := m.Size()
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
return dAtA[:n], nil
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *ConfState) MarshalTo(dAtA []byte) (int, error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Nodes) > 0 {
|
|
|
|
for _, num := range m.Nodes {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x8
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(num))
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
|
|
|
}
|
2017-11-11 05:38:21 +03:00
|
|
|
if len(m.Learners) > 0 {
|
|
|
|
for _, num := range m.Learners {
|
|
|
|
dAtA[i] = 0x10
|
|
|
|
i++
|
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(num))
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.XXX_unrecognized != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *ConfChange) Marshal() (dAtA []byte, err error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
size := m.Size()
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
return dAtA[:n], nil
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *ConfChange) MarshalTo(dAtA []byte) (int, error) {
|
2015-09-04 01:32:25 +03:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x8
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.ID))
|
|
|
|
dAtA[i] = 0x10
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.Type))
|
|
|
|
dAtA[i] = 0x18
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(m.NodeID))
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.Context != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[i] = 0x22
|
2015-09-04 01:32:25 +03:00
|
|
|
i++
|
2016-11-10 22:53:48 +03:00
|
|
|
i = encodeVarintRaft(dAtA, i, uint64(len(m.Context)))
|
|
|
|
i += copy(dAtA[i:], m.Context)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
if m.XXX_unrecognized != nil {
|
2016-11-10 22:53:48 +03:00
|
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func encodeVarintRaft(dAtA []byte, offset int, v uint64) int {
|
2015-09-04 01:32:25 +03:00
|
|
|
for v >= 1<<7 {
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
2015-09-04 01:32:25 +03:00
|
|
|
v >>= 7
|
|
|
|
offset++
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
dAtA[offset] = uint8(v)
|
2015-09-04 01:32:25 +03:00
|
|
|
return offset + 1
|
|
|
|
}
|
|
|
|
func (m *Entry) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
n += 1 + sovRaft(uint64(m.Type))
|
|
|
|
n += 1 + sovRaft(uint64(m.Term))
|
|
|
|
n += 1 + sovRaft(uint64(m.Index))
|
|
|
|
if m.Data != nil {
|
|
|
|
l = len(m.Data)
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
|
}
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SnapshotMetadata) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = m.ConfState.Size()
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
|
n += 1 + sovRaft(uint64(m.Index))
|
|
|
|
n += 1 + sovRaft(uint64(m.Term))
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Snapshot) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Data != nil {
|
|
|
|
l = len(m.Data)
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
|
}
|
|
|
|
l = m.Metadata.Size()
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Message) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
n += 1 + sovRaft(uint64(m.Type))
|
|
|
|
n += 1 + sovRaft(uint64(m.To))
|
|
|
|
n += 1 + sovRaft(uint64(m.From))
|
|
|
|
n += 1 + sovRaft(uint64(m.Term))
|
|
|
|
n += 1 + sovRaft(uint64(m.LogTerm))
|
|
|
|
n += 1 + sovRaft(uint64(m.Index))
|
|
|
|
if len(m.Entries) > 0 {
|
|
|
|
for _, e := range m.Entries {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
n += 1 + sovRaft(uint64(m.Commit))
|
|
|
|
l = m.Snapshot.Size()
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
|
n += 2
|
|
|
|
n += 1 + sovRaft(uint64(m.RejectHint))
|
2016-07-12 11:14:06 +03:00
|
|
|
if m.Context != nil {
|
|
|
|
l = len(m.Context)
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *HardState) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
n += 1 + sovRaft(uint64(m.Term))
|
|
|
|
n += 1 + sovRaft(uint64(m.Vote))
|
|
|
|
n += 1 + sovRaft(uint64(m.Commit))
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConfState) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Nodes) > 0 {
|
|
|
|
for _, e := range m.Nodes {
|
|
|
|
n += 1 + sovRaft(uint64(e))
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
|
|
|
}
|
2017-11-11 05:38:21 +03:00
|
|
|
if len(m.Learners) > 0 {
|
|
|
|
for _, e := range m.Learners {
|
|
|
|
n += 1 + sovRaft(uint64(e))
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
|
2015-09-04 01:32:25 +03:00
|
|
|
func (m *ConfChange) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
n += 1 + sovRaft(uint64(m.ID))
|
|
|
|
n += 1 + sovRaft(uint64(m.Type))
|
|
|
|
n += 1 + sovRaft(uint64(m.NodeID))
|
|
|
|
if m.Context != nil {
|
|
|
|
l = len(m.Context)
|
|
|
|
n += 1 + l + sovRaft(uint64(l))
|
|
|
|
}
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
|
|
|
|
func sovRaft(x uint64) (n int) {
|
|
|
|
for {
|
|
|
|
n++
|
|
|
|
x >>= 7
|
|
|
|
if x == 0 {
|
|
|
|
break
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
return n
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
func sozRaft(x uint64) (n int) {
|
|
|
|
return sovRaft(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Entry) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
2016-01-27 04:41:39 +03:00
|
|
|
preIndex := iNdEx
|
2014-08-28 04:53:36 +04:00
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-08-28 04:53:36 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2014-08-28 04:53:36 +04:00
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
2016-01-27 04:41:39 +03:00
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: Entry: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
2014-08-28 04:53:36 +04:00
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
2015-03-25 20:02:00 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Type = 0
|
2014-08-28 04:53:36 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-08-28 04:53:36 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Type |= (EntryType(b) & 0x7F) << shift
|
2014-08-28 04:53:36 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 0 {
|
2015-03-25 20:02:00 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Term = 0
|
2014-08-28 04:53:36 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-08-28 04:53:36 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Term |= (uint64(b) & 0x7F) << shift
|
2014-08-28 04:53:36 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
case 3:
|
2014-09-29 06:28:12 +04:00
|
|
|
if wireType != 0 {
|
2015-09-04 01:32:25 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
2014-09-29 06:28:12 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Index = 0
|
2014-09-29 06:28:12 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-09-29 06:28:12 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Index |= (uint64(b) & 0x7F) << shift
|
2014-09-29 06:28:12 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
2014-12-31 06:42:59 +03:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
var byteLen int
|
2014-12-31 06:42:59 +03:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-12-31 06:42:59 +03:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
byteLen |= (int(b) & 0x7F) << shift
|
2014-12-31 06:42:59 +03:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
2016-01-27 04:41:39 +03:00
|
|
|
if m.Data == nil {
|
|
|
|
m.Data = []byte{}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx = postIndex
|
2014-08-28 04:53:36 +04:00
|
|
|
default:
|
2016-01-27 04:41:39 +03:00
|
|
|
iNdEx = preIndex
|
2016-11-10 22:53:48 +03:00
|
|
|
skippy, err := skipRaft(dAtA[iNdEx:])
|
2014-08-28 04:53:36 +04:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if (iNdEx + skippy) > l {
|
2014-08-28 04:53:36 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx += skippy
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2014-08-28 04:53:36 +04:00
|
|
|
return nil
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *SnapshotMetadata) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
2016-01-27 04:41:39 +03:00
|
|
|
preIndex := iNdEx
|
2014-08-28 05:53:18 +04:00
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-08-28 05:53:18 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2014-08-28 05:53:18 +04:00
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
2016-01-27 04:41:39 +03:00
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: SnapshotMetadata: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: SnapshotMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
2014-08-28 05:53:18 +04:00
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
2015-09-04 01:32:25 +03:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ConfState", wireType)
|
2014-08-28 05:53:18 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
var msglen int
|
2014-08-28 05:53:18 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-08-28 05:53:18 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
2014-08-28 05:53:18 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
if err := m.ConfState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2015-09-04 01:32:25 +03:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2014-08-28 05:53:18 +04:00
|
|
|
case 2:
|
|
|
|
if wireType != 0 {
|
2015-09-04 01:32:25 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
2014-08-28 05:53:18 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Index = 0
|
2014-08-28 05:53:18 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-08-28 05:53:18 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Index |= (uint64(b) & 0x7F) << shift
|
2014-08-28 05:53:18 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
2015-09-04 01:32:25 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
2014-08-28 05:53:18 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Term = 0
|
2014-08-28 05:53:18 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-08-28 05:53:18 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Term |= (uint64(b) & 0x7F) << shift
|
2014-08-28 05:53:18 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
2016-01-27 04:41:39 +03:00
|
|
|
iNdEx = preIndex
|
2016-11-10 22:53:48 +03:00
|
|
|
skippy, err := skipRaft(dAtA[iNdEx:])
|
2014-08-28 05:53:18 +04:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if (iNdEx + skippy) > l {
|
2014-08-28 05:53:18 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx += skippy
|
2014-08-28 05:53:18 +04:00
|
|
|
}
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2014-08-28 05:53:18 +04:00
|
|
|
return nil
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
2016-01-27 04:41:39 +03:00
|
|
|
preIndex := iNdEx
|
2014-11-20 00:17:50 +03:00
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-11-20 00:17:50 +03:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2014-11-20 00:17:50 +03:00
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
2016-01-27 04:41:39 +03:00
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
2014-11-20 00:17:50 +03:00
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
2015-09-04 01:32:25 +03:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
var byteLen int
|
2014-11-20 00:17:50 +03:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-11-20 00:17:50 +03:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
byteLen |= (int(b) & 0x7F) << shift
|
2014-11-20 00:17:50 +03:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
2016-01-27 04:41:39 +03:00
|
|
|
if m.Data == nil {
|
|
|
|
m.Data = []byte{}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2015-09-04 01:32:25 +03:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2014-11-20 00:17:50 +03:00
|
|
|
default:
|
2016-01-27 04:41:39 +03:00
|
|
|
iNdEx = preIndex
|
2016-11-10 22:53:48 +03:00
|
|
|
skippy, err := skipRaft(dAtA[iNdEx:])
|
2014-11-20 00:17:50 +03:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if (iNdEx + skippy) > l {
|
2014-11-20 00:17:50 +03:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx += skippy
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2014-11-20 00:17:50 +03:00
|
|
|
return nil
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *Message) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
2016-01-27 04:41:39 +03:00
|
|
|
preIndex := iNdEx
|
2014-09-23 01:38:21 +04:00
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-09-23 01:38:21 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2014-09-23 01:38:21 +04:00
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
2016-01-27 04:41:39 +03:00
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: Message: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
2014-09-23 01:38:21 +04:00
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
2015-09-04 01:32:25 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Type = 0
|
2014-09-23 01:38:21 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-09-23 01:38:21 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Type |= (MessageType(b) & 0x7F) << shift
|
2014-09-23 01:38:21 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 0 {
|
2015-09-04 01:32:25 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field To", wireType)
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.To = 0
|
2014-09-23 01:38:21 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-09-23 01:38:21 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.To |= (uint64(b) & 0x7F) << shift
|
2014-09-23 01:38:21 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
2015-09-04 01:32:25 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.From = 0
|
2014-09-23 01:38:21 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-09-23 01:38:21 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.From |= (uint64(b) & 0x7F) << shift
|
2014-09-23 01:38:21 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 4:
|
2015-09-04 01:32:25 +03:00
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
|
|
|
}
|
|
|
|
m.Term = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.Term |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 5:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LogTerm", wireType)
|
|
|
|
}
|
|
|
|
m.LogTerm = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.LogTerm |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 6:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
|
|
|
}
|
|
|
|
m.Index = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.Index |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 7:
|
2014-09-23 01:38:21 +04:00
|
|
|
if wireType != 2 {
|
2015-09-04 01:32:25 +03:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType)
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
var msglen int
|
2014-09-23 01:38:21 +04:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2014-09-23 01:38:21 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
2014-09-23 01:38:21 +04:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
2014-09-23 01:38:21 +04:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Entries = append(m.Entries, Entry{})
|
2016-11-10 22:53:48 +03:00
|
|
|
if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2015-09-04 01:32:25 +03:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 8:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
|
|
|
|
}
|
|
|
|
m.Commit = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.Commit |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 9:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2015-09-04 01:32:25 +03:00
|
|
|
return err
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx = postIndex
|
2015-09-04 01:32:25 +03:00
|
|
|
case 10:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Reject", wireType)
|
|
|
|
}
|
|
|
|
var v int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
v |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m.Reject = bool(v != 0)
|
|
|
|
case 11:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RejectHint", wireType)
|
|
|
|
}
|
|
|
|
m.RejectHint = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.RejectHint |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2016-07-12 11:14:06 +03:00
|
|
|
case 12:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2016-07-12 11:14:06 +03:00
|
|
|
iNdEx++
|
|
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...)
|
2016-07-12 11:14:06 +03:00
|
|
|
if m.Context == nil {
|
|
|
|
m.Context = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2014-09-23 01:38:21 +04:00
|
|
|
default:
|
2016-01-27 04:41:39 +03:00
|
|
|
iNdEx = preIndex
|
2016-11-10 22:53:48 +03:00
|
|
|
skippy, err := skipRaft(dAtA[iNdEx:])
|
2014-09-23 01:38:21 +04:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if (iNdEx + skippy) > l {
|
2014-09-23 01:38:21 +04:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx += skippy
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2014-09-23 01:38:21 +04:00
|
|
|
return nil
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *HardState) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
2016-01-27 04:41:39 +03:00
|
|
|
preIndex := iNdEx
|
2015-06-30 02:05:55 +03:00
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2015-09-04 01:32:25 +03:00
|
|
|
return io.ErrUnexpectedEOF
|
2015-06-30 02:05:55 +03:00
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
fieldNum := int32(wire >> 3)
|
2015-06-30 02:05:55 +03:00
|
|
|
wireType := int(wire & 0x7)
|
2016-01-27 04:41:39 +03:00
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: HardState: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: HardState: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
switch fieldNum {
|
2015-06-30 02:05:55 +03:00
|
|
|
case 1:
|
2015-09-04 01:32:25 +03:00
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
|
|
|
}
|
|
|
|
m.Term = 0
|
2015-06-30 02:05:55 +03:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-06-30 02:05:55 +03:00
|
|
|
if iNdEx >= l {
|
2015-09-04 01:32:25 +03:00
|
|
|
return io.ErrUnexpectedEOF
|
2015-06-30 02:05:55 +03:00
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-06-30 02:05:55 +03:00
|
|
|
iNdEx++
|
2015-09-04 01:32:25 +03:00
|
|
|
m.Term |= (uint64(b) & 0x7F) << shift
|
2015-06-30 02:05:55 +03:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType)
|
|
|
|
}
|
|
|
|
m.Vote = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.Vote |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
|
|
|
|
}
|
|
|
|
m.Commit = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.Commit |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
2016-01-27 04:41:39 +03:00
|
|
|
iNdEx = preIndex
|
2016-11-10 22:53:48 +03:00
|
|
|
skippy, err := skipRaft(dAtA[iNdEx:])
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx += skippy
|
|
|
|
}
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-03-25 20:02:00 +03:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
return nil
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *ConfState) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
2016-01-27 04:41:39 +03:00
|
|
|
preIndex := iNdEx
|
2015-09-04 01:32:25 +03:00
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
2016-01-27 04:41:39 +03:00
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: ConfState: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: ConfState: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
2017-06-13 00:25:01 +03:00
|
|
|
if wireType == 0 {
|
|
|
|
var v uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m.Nodes = append(m.Nodes, v)
|
|
|
|
} else if wireType == 2 {
|
|
|
|
var packedLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
packedLen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if packedLen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + packedLen
|
|
|
|
if postIndex > l {
|
2015-09-04 01:32:25 +03:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-13 00:25:01 +03:00
|
|
|
for iNdEx < postIndex {
|
|
|
|
var v uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m.Nodes = append(m.Nodes, v)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType)
|
2015-09-04 01:32:25 +03:00
|
|
|
}
|
2017-11-11 05:38:21 +03:00
|
|
|
case 2:
|
|
|
|
if wireType == 0 {
|
|
|
|
var v uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m.Learners = append(m.Learners, v)
|
|
|
|
} else if wireType == 2 {
|
|
|
|
var packedLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
packedLen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if packedLen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + packedLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
for iNdEx < postIndex {
|
|
|
|
var v uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
v |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m.Learners = append(m.Learners, v)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Learners", wireType)
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
default:
|
2016-01-27 04:41:39 +03:00
|
|
|
iNdEx = preIndex
|
2016-11-10 22:53:48 +03:00
|
|
|
skippy, err := skipRaft(dAtA[iNdEx:])
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx += skippy
|
|
|
|
}
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
2015-03-25 20:02:00 +03:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
return nil
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func (m *ConfChange) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
2016-01-27 04:41:39 +03:00
|
|
|
preIndex := iNdEx
|
2015-09-04 01:32:25 +03:00
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
2016-01-27 04:41:39 +03:00
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: ConfChange: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: ConfChange: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
|
|
|
}
|
|
|
|
m.ID = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.ID |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
|
|
}
|
|
|
|
m.Type = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.Type |= (ConfChangeType(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
|
|
|
|
}
|
|
|
|
m.NodeID = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
m.NodeID |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...)
|
2016-01-27 04:41:39 +03:00
|
|
|
if m.Context == nil {
|
|
|
|
m.Context = []byte{}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
2016-01-27 04:41:39 +03:00
|
|
|
iNdEx = preIndex
|
2016-11-10 22:53:48 +03:00
|
|
|
skippy, err := skipRaft(dAtA[iNdEx:])
|
2014-08-28 04:53:36 +04:00
|
|
|
if err != nil {
|
2015-09-04 01:32:25 +03:00
|
|
|
return err
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx += skippy
|
2014-08-28 04:53:36 +04:00
|
|
|
}
|
|
|
|
}
|
2015-03-25 20:02:00 +03:00
|
|
|
|
2016-01-27 04:41:39 +03:00
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
return nil
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
func skipRaft(dAtA []byte) (n int, err error) {
|
|
|
|
l := len(dAtA)
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
switch wireType {
|
|
|
|
case 0:
|
2016-01-27 04:41:39 +03:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx++
|
2016-11-10 22:53:48 +03:00
|
|
|
if dAtA[iNdEx-1] < 0x80 {
|
2015-09-04 01:32:25 +03:00
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return iNdEx, nil
|
|
|
|
case 1:
|
|
|
|
iNdEx += 8
|
|
|
|
return iNdEx, nil
|
|
|
|
case 2:
|
|
|
|
var length int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
length |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iNdEx += length
|
|
|
|
if length < 0 {
|
|
|
|
return 0, ErrInvalidLengthRaft
|
|
|
|
}
|
|
|
|
return iNdEx, nil
|
|
|
|
case 3:
|
|
|
|
for {
|
|
|
|
var innerWire uint64
|
|
|
|
var start int = iNdEx
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
2016-01-27 04:41:39 +03:00
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowRaft
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
b := dAtA[iNdEx]
|
2015-09-04 01:32:25 +03:00
|
|
|
iNdEx++
|
|
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
innerWireType := int(innerWire & 0x7)
|
|
|
|
if innerWireType == 4 {
|
|
|
|
break
|
|
|
|
}
|
2016-11-10 22:53:48 +03:00
|
|
|
next, err := skipRaft(dAtA[start:])
|
2015-09-04 01:32:25 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
iNdEx = start + next
|
|
|
|
}
|
|
|
|
return iNdEx, nil
|
|
|
|
case 4:
|
|
|
|
return iNdEx, nil
|
|
|
|
case 5:
|
|
|
|
iNdEx += 4
|
|
|
|
return iNdEx, nil
|
|
|
|
default:
|
|
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
2014-11-20 00:17:50 +03:00
|
|
|
}
|
|
|
|
}
|
2015-09-04 01:32:25 +03:00
|
|
|
panic("unreachable")
|
2014-09-23 01:38:21 +04:00
|
|
|
}
|
2015-03-25 20:02:00 +03:00
|
|
|
|
2015-09-04 01:32:25 +03:00
|
|
|
var (
|
|
|
|
ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling")
|
2016-01-27 04:41:39 +03:00
|
|
|
ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow")
|
2015-09-04 01:32:25 +03:00
|
|
|
)
|
2016-04-26 00:08:33 +03:00
|
|
|
|
2016-11-10 22:53:48 +03:00
|
|
|
func init() { proto.RegisterFile("raft.proto", fileDescriptorRaft) }
|
|
|
|
|
2016-04-26 00:08:33 +03:00
|
|
|
var fileDescriptorRaft = []byte{
|
2017-11-11 05:38:21 +03:00
|
|
|
// 815 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x54, 0xcd, 0x6e, 0x23, 0x45,
|
|
|
|
0x10, 0xf6, 0x8c, 0xc7, 0x7f, 0x35, 0x8e, 0xd3, 0xa9, 0x35, 0xa8, 0x15, 0x45, 0xc6, 0xb2, 0x38,
|
|
|
|
0x58, 0x41, 0x1b, 0x20, 0x07, 0x0e, 0x48, 0x1c, 0x36, 0x09, 0x52, 0x22, 0xad, 0xa3, 0xc5, 0x9b,
|
|
|
|
0xe5, 0x80, 0x84, 0x50, 0xc7, 0x53, 0x9e, 0x18, 0x32, 0xd3, 0xa3, 0x9e, 0xf6, 0xb2, 0xb9, 0x20,
|
|
|
|
0x1e, 0x80, 0x07, 0xe0, 0xc2, 0xfb, 0xe4, 0xb8, 0x12, 0x77, 0xc4, 0x86, 0x17, 0x41, 0xdd, 0xd3,
|
|
|
|
0x63, 0xcf, 0x24, 0xb7, 0xae, 0xef, 0xab, 0xae, 0xfa, 0xea, 0xeb, 0x9a, 0x01, 0x50, 0x62, 0xa9,
|
|
|
|
0x8f, 0x32, 0x25, 0xb5, 0xc4, 0xb6, 0x39, 0x67, 0xd7, 0xfb, 0xc3, 0x58, 0xc6, 0xd2, 0x42, 0x9f,
|
|
|
|
0x9b, 0x53, 0xc1, 0x4e, 0x7e, 0x83, 0xd6, 0xb7, 0xa9, 0x56, 0x77, 0xf8, 0x19, 0x04, 0x57, 0x77,
|
|
|
|
0x19, 0x71, 0x6f, 0xec, 0x4d, 0x07, 0xc7, 0x7b, 0x47, 0xc5, 0xad, 0x23, 0x4b, 0x1a, 0xe2, 0x24,
|
|
|
|
0xb8, 0xff, 0xe7, 0x93, 0xc6, 0xdc, 0x26, 0x21, 0x87, 0xe0, 0x8a, 0x54, 0xc2, 0xfd, 0xb1, 0x37,
|
|
|
|
0x0d, 0x36, 0x0c, 0xa9, 0x04, 0xf7, 0xa1, 0x75, 0x91, 0x46, 0xf4, 0x8e, 0x37, 0x2b, 0x54, 0x01,
|
|
|
|
0x21, 0x42, 0x70, 0x26, 0xb4, 0xe0, 0xc1, 0xd8, 0x9b, 0xf6, 0xe7, 0xf6, 0x3c, 0xf9, 0xdd, 0x03,
|
|
|
|
0xf6, 0x3a, 0x15, 0x59, 0x7e, 0x23, 0xf5, 0x8c, 0xb4, 0x88, 0x84, 0x16, 0xf8, 0x15, 0xc0, 0x42,
|
|
|
|
0xa6, 0xcb, 0x9f, 0x72, 0x2d, 0x74, 0xa1, 0x28, 0xdc, 0x2a, 0x3a, 0x95, 0xe9, 0xf2, 0xb5, 0x21,
|
|
|
|
0x5c, 0xf1, 0xde, 0xa2, 0x04, 0x4c, 0xf3, 0x95, 0x6d, 0x5e, 0xd5, 0x55, 0x40, 0x46, 0xb2, 0x36,
|
|
|
|
0x92, 0xab, 0xba, 0x2c, 0x32, 0xf9, 0x01, 0xba, 0xa5, 0x02, 0x23, 0xd1, 0x28, 0xb0, 0x3d, 0xfb,
|
|
|
|
0x73, 0x7b, 0xc6, 0xaf, 0xa1, 0x9b, 0x38, 0x65, 0xb6, 0x70, 0x78, 0xcc, 0x4b, 0x2d, 0x8f, 0x95,
|
|
|
|
0xbb, 0xba, 0x9b, 0xfc, 0xc9, 0x5f, 0x4d, 0xe8, 0xcc, 0x28, 0xcf, 0x45, 0x4c, 0xf8, 0x1c, 0x02,
|
|
|
|
0xbd, 0x75, 0xf8, 0x59, 0x59, 0xc3, 0xd1, 0x55, 0x8f, 0x4d, 0x1a, 0x0e, 0xc1, 0xd7, 0xb2, 0x36,
|
|
|
|
0x89, 0xaf, 0xa5, 0x19, 0x63, 0xa9, 0xe4, 0xa3, 0x31, 0x0c, 0xb2, 0x19, 0x30, 0x78, 0x3c, 0x20,
|
|
|
|
0x8e, 0xa0, 0x73, 0x2b, 0x63, 0xfb, 0x60, 0xad, 0x0a, 0x59, 0x82, 0x5b, 0xdb, 0xda, 0x4f, 0x6d,
|
|
|
|
0x7b, 0x0e, 0x1d, 0x4a, 0xb5, 0x5a, 0x51, 0xce, 0x3b, 0xe3, 0xe6, 0x34, 0x3c, 0xde, 0xa9, 0x6d,
|
|
|
|
0x46, 0x59, 0xca, 0xe5, 0xe0, 0x01, 0xb4, 0x17, 0x32, 0x49, 0x56, 0x9a, 0x77, 0x2b, 0xb5, 0x1c,
|
|
|
|
0x86, 0xc7, 0xd0, 0xcd, 0x9d, 0x63, 0xbc, 0x67, 0x9d, 0x64, 0x8f, 0x9d, 0x2c, 0x1d, 0x2c, 0xf3,
|
|
|
|
0x4c, 0x45, 0x45, 0x3f, 0xd3, 0x42, 0x73, 0x18, 0x7b, 0xd3, 0x6e, 0x59, 0xb1, 0xc0, 0xf0, 0x53,
|
|
|
|
0x80, 0xe2, 0x74, 0xbe, 0x4a, 0x35, 0x0f, 0x2b, 0x3d, 0x2b, 0x38, 0x72, 0xe8, 0x2c, 0x64, 0xaa,
|
|
|
|
0xe9, 0x9d, 0xe6, 0x7d, 0xfb, 0xb0, 0x65, 0x38, 0xf9, 0x11, 0x7a, 0xe7, 0x42, 0x45, 0xc5, 0xfa,
|
|
|
|
0x94, 0x0e, 0x7a, 0x4f, 0x1c, 0xe4, 0x10, 0xbc, 0x95, 0x9a, 0xea, 0xfb, 0x6e, 0x90, 0xca, 0xc0,
|
|
|
|
0xcd, 0xa7, 0x03, 0x4f, 0xbe, 0x81, 0xde, 0x66, 0x5d, 0x71, 0x08, 0xad, 0x54, 0x46, 0x94, 0x73,
|
|
|
|
0x6f, 0xdc, 0x9c, 0x06, 0xf3, 0x22, 0xc0, 0x7d, 0xe8, 0xde, 0x92, 0x50, 0x29, 0xa9, 0x9c, 0xfb,
|
|
|
|
0x96, 0xd8, 0xc4, 0x93, 0x3f, 0x3c, 0x00, 0x73, 0xff, 0xf4, 0x46, 0xa4, 0xb1, 0xdd, 0x88, 0x8b,
|
|
|
|
0xb3, 0x9a, 0x3a, 0xff, 0xe2, 0x0c, 0xbf, 0x70, 0x1f, 0xae, 0x6f, 0xd7, 0xea, 0xe3, 0xea, 0x67,
|
|
|
|
0x52, 0xdc, 0x7b, 0xf2, 0xf5, 0x1e, 0x40, 0xfb, 0x52, 0x46, 0x74, 0x71, 0x56, 0xd7, 0x5c, 0x60,
|
|
|
|
0xc6, 0xac, 0x53, 0x67, 0x56, 0xf1, 0xa1, 0x96, 0xe1, 0xe1, 0x97, 0xd0, 0xdb, 0xfc, 0x0e, 0x70,
|
|
|
|
0x17, 0x42, 0x1b, 0x5c, 0x4a, 0x95, 0x88, 0x5b, 0xd6, 0xc0, 0x67, 0xb0, 0x6b, 0x81, 0x6d, 0x63,
|
|
|
|
0xe6, 0x1d, 0xfe, 0xed, 0x43, 0x58, 0x59, 0x70, 0x04, 0x68, 0xcf, 0xf2, 0xf8, 0x7c, 0x9d, 0xb1,
|
|
|
|
0x06, 0x86, 0xd0, 0x99, 0xe5, 0xf1, 0x09, 0x09, 0xcd, 0x3c, 0x17, 0xbc, 0x52, 0x32, 0x63, 0xbe,
|
|
|
|
0xcb, 0x7a, 0x91, 0x65, 0xac, 0x89, 0x03, 0x80, 0xe2, 0x3c, 0xa7, 0x3c, 0x63, 0x81, 0x4b, 0xfc,
|
|
|
|
0x5e, 0x6a, 0x62, 0x2d, 0x23, 0xc2, 0x05, 0x96, 0x6d, 0x3b, 0xd6, 0x2c, 0x13, 0xeb, 0x20, 0x83,
|
|
|
|
0xbe, 0x69, 0x46, 0x42, 0xe9, 0x6b, 0xd3, 0xa5, 0x8b, 0x43, 0x60, 0x55, 0xc4, 0x5e, 0xea, 0x21,
|
|
|
|
0xc2, 0x60, 0x96, 0xc7, 0x6f, 0x52, 0x45, 0x62, 0x71, 0x23, 0xae, 0x6f, 0x89, 0x01, 0xee, 0xc1,
|
|
|
|
0x8e, 0x2b, 0x64, 0x1e, 0x6f, 0x9d, 0xb3, 0xd0, 0xa5, 0x9d, 0xde, 0xd0, 0xe2, 0x97, 0xef, 0xd6,
|
|
|
|
0x52, 0xad, 0x13, 0xd6, 0xc7, 0x8f, 0x60, 0x6f, 0x96, 0xc7, 0x57, 0x4a, 0xa4, 0xf9, 0x92, 0xd4,
|
|
|
|
0x4b, 0x12, 0x11, 0x29, 0xb6, 0xe3, 0x6e, 0x5f, 0xad, 0x12, 0x92, 0x6b, 0x7d, 0x29, 0x7f, 0x65,
|
|
|
|
0x03, 0x27, 0x66, 0x4e, 0x22, 0xb2, 0x3f, 0x43, 0xb6, 0xeb, 0xc4, 0x6c, 0x10, 0x2b, 0x86, 0xb9,
|
|
|
|
0x79, 0x5f, 0x29, 0xb2, 0x23, 0xee, 0xb9, 0xae, 0x2e, 0xb6, 0x39, 0x78, 0x78, 0x07, 0x83, 0xfa,
|
|
|
|
0xf3, 0x1a, 0x1d, 0x5b, 0xe4, 0x45, 0x14, 0x99, 0xb7, 0x64, 0x0d, 0xe4, 0x30, 0xdc, 0xc2, 0x73,
|
|
|
|
0x4a, 0xe4, 0x5b, 0xb2, 0x8c, 0x57, 0x67, 0xde, 0x64, 0x91, 0xd0, 0x05, 0xe3, 0xe3, 0x01, 0xf0,
|
|
|
|
0x5a, 0xa9, 0x97, 0xc5, 0x36, 0x5a, 0xb6, 0x79, 0xc2, 0xef, 0x3f, 0x8c, 0x1a, 0xef, 0x3f, 0x8c,
|
|
|
|
0x1a, 0xf7, 0x0f, 0x23, 0xef, 0xfd, 0xc3, 0xc8, 0xfb, 0xf7, 0x61, 0xe4, 0xfd, 0xf9, 0xdf, 0xa8,
|
|
|
|
0xf1, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x86, 0x52, 0x5b, 0xe0, 0x74, 0x06, 0x00, 0x00,
|
2016-04-26 00:08:33 +03:00
|
|
|
}
|