Fix the build
parent
57d29e8bed
commit
34732ad598
|
@ -2,34 +2,50 @@
|
|||
// source: append_entries_request.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
/*
|
||||
Package protobuf is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
append_entries_request.proto
|
||||
append_entries_responses.proto
|
||||
log_entry.proto
|
||||
request_vote_request.proto
|
||||
request_vote_responses.proto
|
||||
snapshot_recovery_request.proto
|
||||
snapshot_recovery_response.proto
|
||||
snapshot_request.proto
|
||||
snapshot_response.proto
|
||||
|
||||
It has these top-level messages:
|
||||
AppendEntriesRequest
|
||||
*/
|
||||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io1 "io"
|
||||
import fmt4 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto2 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt3 "fmt"
|
||||
import fmt5 "fmt"
|
||||
import strings2 "strings"
|
||||
import reflect2 "reflect"
|
||||
|
||||
import fmt4 "fmt"
|
||||
import fmt6 "fmt"
|
||||
import strings3 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto3 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort1 "sort"
|
||||
import strconv1 "strconv"
|
||||
import reflect3 "reflect"
|
||||
|
||||
import fmt5 "fmt"
|
||||
import fmt7 "fmt"
|
||||
import bytes1 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type AppendEntriesRequest struct {
|
||||
|
@ -110,7 +126,7 @@ func (m *AppendEntriesRequest) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt4.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -127,7 +143,7 @@ func (m *AppendEntriesRequest) Unmarshal(data []byte) error {
|
|||
m.Term = &v
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt4.Errorf("proto: wrong wireType = %d for field PrevLogIndex", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -144,7 +160,7 @@ func (m *AppendEntriesRequest) Unmarshal(data []byte) error {
|
|||
m.PrevLogIndex = &v
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt4.Errorf("proto: wrong wireType = %d for field PrevLogTerm", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -161,7 +177,7 @@ func (m *AppendEntriesRequest) Unmarshal(data []byte) error {
|
|||
m.PrevLogTerm = &v
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt4.Errorf("proto: wrong wireType = %d for field CommitIndex", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -178,7 +194,7 @@ func (m *AppendEntriesRequest) Unmarshal(data []byte) error {
|
|||
m.CommitIndex = &v
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt4.Errorf("proto: wrong wireType = %d for field LeaderName", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -201,7 +217,7 @@ func (m *AppendEntriesRequest) Unmarshal(data []byte) error {
|
|||
index = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt4.Errorf("proto: wrong wireType = %d for field Entries", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -236,6 +252,9 @@ func (m *AppendEntriesRequest) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io1.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -252,8 +271,8 @@ func (this *AppendEntriesRequest) String() string {
|
|||
`PrevLogTerm:` + valueToStringAppendEntriesRequest(this.PrevLogTerm) + `,`,
|
||||
`CommitIndex:` + valueToStringAppendEntriesRequest(this.CommitIndex) + `,`,
|
||||
`LeaderName:` + valueToStringAppendEntriesRequest(this.LeaderName) + `,`,
|
||||
`Entries:` + strings2.Replace(fmt3.Sprintf("%v", this.Entries), "LogEntry", "LogEntry", 1) + `,`,
|
||||
`XXX_unrecognized:` + fmt3.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`Entries:` + strings2.Replace(fmt5.Sprintf("%v", this.Entries), "LogEntry", "LogEntry", 1) + `,`,
|
||||
`XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -264,7 +283,7 @@ func valueToStringAppendEntriesRequest(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect2.Indirect(rv).Interface()
|
||||
return fmt3.Sprintf("*%v", pv)
|
||||
return fmt5.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *AppendEntriesRequest) Size() (n int) {
|
||||
var l int
|
||||
|
@ -309,7 +328,6 @@ func sovAppendEntriesRequest(x uint64) (n int) {
|
|||
}
|
||||
func sozAppendEntriesRequest(x uint64) (n int) {
|
||||
return sovAppendEntriesRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovAppendEntriesRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedAppendEntriesRequest(r randyAppendEntriesRequest, easy bool) *AppendEntriesRequest {
|
||||
this := &AppendEntriesRequest{}
|
||||
|
@ -377,7 +395,11 @@ func randFieldAppendEntriesRequest(data []byte, r randyAppendEntriesRequest, fie
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateAppendEntriesRequest(data, uint64(key))
|
||||
data = encodeVarintPopulateAppendEntriesRequest(data, uint64(r.Int63()))
|
||||
v8 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v8 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateAppendEntriesRequest(data, uint64(v8))
|
||||
case 1:
|
||||
data = encodeVarintPopulateAppendEntriesRequest(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -491,7 +513,7 @@ func (this *AppendEntriesRequest) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings3.Join([]string{`&protobuf.AppendEntriesRequest{` + `Term:` + valueToGoStringAppendEntriesRequest(this.Term, "uint64"), `PrevLogIndex:` + valueToGoStringAppendEntriesRequest(this.PrevLogIndex, "uint64"), `PrevLogTerm:` + valueToGoStringAppendEntriesRequest(this.PrevLogTerm, "uint64"), `CommitIndex:` + valueToGoStringAppendEntriesRequest(this.CommitIndex, "uint64"), `LeaderName:` + valueToGoStringAppendEntriesRequest(this.LeaderName, "string"), `Entries:` + fmt4.Sprintf("%#v", this.Entries), `XXX_unrecognized:` + fmt4.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings3.Join([]string{`&protobuf.AppendEntriesRequest{` + `Term:` + valueToGoStringAppendEntriesRequest(this.Term, "uint64"), `PrevLogIndex:` + valueToGoStringAppendEntriesRequest(this.PrevLogIndex, "uint64"), `PrevLogTerm:` + valueToGoStringAppendEntriesRequest(this.PrevLogTerm, "uint64"), `CommitIndex:` + valueToGoStringAppendEntriesRequest(this.CommitIndex, "uint64"), `LeaderName:` + valueToGoStringAppendEntriesRequest(this.LeaderName, "string"), `Entries:` + fmt6.Sprintf("%#v", this.Entries), `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringAppendEntriesRequest(v interface{}, typ string) string {
|
||||
|
@ -500,7 +522,7 @@ func valueToGoStringAppendEntriesRequest(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect3.Indirect(rv).Interface()
|
||||
return fmt4.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt6.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringAppendEntriesRequest(e map[int32]code_google_com_p_gogoprotobuf_proto3.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -524,76 +546,76 @@ func (this *AppendEntriesRequest) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt5.Errorf("that == nil && this != nil")
|
||||
return fmt7.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*AppendEntriesRequest)
|
||||
if !ok {
|
||||
return fmt5.Errorf("that is not of type *AppendEntriesRequest")
|
||||
return fmt7.Errorf("that is not of type *AppendEntriesRequest")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt5.Errorf("that is type *AppendEntriesRequest but is nil && this != nil")
|
||||
return fmt7.Errorf("that is type *AppendEntriesRequest but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt5.Errorf("that is type *AppendEntriesRequestbut is not nil && this == nil")
|
||||
return fmt7.Errorf("that is type *AppendEntriesRequestbut is not nil && this == nil")
|
||||
}
|
||||
if this.Term != nil && that1.Term != nil {
|
||||
if *this.Term != *that1.Term {
|
||||
return fmt5.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
return fmt7.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
}
|
||||
} else if this.Term != nil {
|
||||
return fmt5.Errorf("this.Term == nil && that.Term != nil")
|
||||
return fmt7.Errorf("this.Term == nil && that.Term != nil")
|
||||
} else if that1.Term != nil {
|
||||
return fmt5.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
return fmt7.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
}
|
||||
if this.PrevLogIndex != nil && that1.PrevLogIndex != nil {
|
||||
if *this.PrevLogIndex != *that1.PrevLogIndex {
|
||||
return fmt5.Errorf("PrevLogIndex this(%v) Not Equal that(%v)", *this.PrevLogIndex, *that1.PrevLogIndex)
|
||||
return fmt7.Errorf("PrevLogIndex this(%v) Not Equal that(%v)", *this.PrevLogIndex, *that1.PrevLogIndex)
|
||||
}
|
||||
} else if this.PrevLogIndex != nil {
|
||||
return fmt5.Errorf("this.PrevLogIndex == nil && that.PrevLogIndex != nil")
|
||||
return fmt7.Errorf("this.PrevLogIndex == nil && that.PrevLogIndex != nil")
|
||||
} else if that1.PrevLogIndex != nil {
|
||||
return fmt5.Errorf("PrevLogIndex this(%v) Not Equal that(%v)", this.PrevLogIndex, that1.PrevLogIndex)
|
||||
return fmt7.Errorf("PrevLogIndex this(%v) Not Equal that(%v)", this.PrevLogIndex, that1.PrevLogIndex)
|
||||
}
|
||||
if this.PrevLogTerm != nil && that1.PrevLogTerm != nil {
|
||||
if *this.PrevLogTerm != *that1.PrevLogTerm {
|
||||
return fmt5.Errorf("PrevLogTerm this(%v) Not Equal that(%v)", *this.PrevLogTerm, *that1.PrevLogTerm)
|
||||
return fmt7.Errorf("PrevLogTerm this(%v) Not Equal that(%v)", *this.PrevLogTerm, *that1.PrevLogTerm)
|
||||
}
|
||||
} else if this.PrevLogTerm != nil {
|
||||
return fmt5.Errorf("this.PrevLogTerm == nil && that.PrevLogTerm != nil")
|
||||
return fmt7.Errorf("this.PrevLogTerm == nil && that.PrevLogTerm != nil")
|
||||
} else if that1.PrevLogTerm != nil {
|
||||
return fmt5.Errorf("PrevLogTerm this(%v) Not Equal that(%v)", this.PrevLogTerm, that1.PrevLogTerm)
|
||||
return fmt7.Errorf("PrevLogTerm this(%v) Not Equal that(%v)", this.PrevLogTerm, that1.PrevLogTerm)
|
||||
}
|
||||
if this.CommitIndex != nil && that1.CommitIndex != nil {
|
||||
if *this.CommitIndex != *that1.CommitIndex {
|
||||
return fmt5.Errorf("CommitIndex this(%v) Not Equal that(%v)", *this.CommitIndex, *that1.CommitIndex)
|
||||
return fmt7.Errorf("CommitIndex this(%v) Not Equal that(%v)", *this.CommitIndex, *that1.CommitIndex)
|
||||
}
|
||||
} else if this.CommitIndex != nil {
|
||||
return fmt5.Errorf("this.CommitIndex == nil && that.CommitIndex != nil")
|
||||
return fmt7.Errorf("this.CommitIndex == nil && that.CommitIndex != nil")
|
||||
} else if that1.CommitIndex != nil {
|
||||
return fmt5.Errorf("CommitIndex this(%v) Not Equal that(%v)", this.CommitIndex, that1.CommitIndex)
|
||||
return fmt7.Errorf("CommitIndex this(%v) Not Equal that(%v)", this.CommitIndex, that1.CommitIndex)
|
||||
}
|
||||
if this.LeaderName != nil && that1.LeaderName != nil {
|
||||
if *this.LeaderName != *that1.LeaderName {
|
||||
return fmt5.Errorf("LeaderName this(%v) Not Equal that(%v)", *this.LeaderName, *that1.LeaderName)
|
||||
return fmt7.Errorf("LeaderName this(%v) Not Equal that(%v)", *this.LeaderName, *that1.LeaderName)
|
||||
}
|
||||
} else if this.LeaderName != nil {
|
||||
return fmt5.Errorf("this.LeaderName == nil && that.LeaderName != nil")
|
||||
return fmt7.Errorf("this.LeaderName == nil && that.LeaderName != nil")
|
||||
} else if that1.LeaderName != nil {
|
||||
return fmt5.Errorf("LeaderName this(%v) Not Equal that(%v)", this.LeaderName, that1.LeaderName)
|
||||
return fmt7.Errorf("LeaderName this(%v) Not Equal that(%v)", this.LeaderName, that1.LeaderName)
|
||||
}
|
||||
if len(this.Entries) != len(that1.Entries) {
|
||||
return fmt5.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries))
|
||||
return fmt7.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries))
|
||||
}
|
||||
for i := range this.Entries {
|
||||
if !this.Entries[i].Equal(that1.Entries[i]) {
|
||||
return fmt5.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i])
|
||||
return fmt7.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i])
|
||||
}
|
||||
}
|
||||
if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt5.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io2 "io"
|
||||
import fmt8 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto4 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt6 "fmt"
|
||||
import fmt9 "fmt"
|
||||
import strings4 "strings"
|
||||
import reflect4 "reflect"
|
||||
|
||||
import fmt7 "fmt"
|
||||
import fmt10 "fmt"
|
||||
import strings5 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto5 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort2 "sort"
|
||||
import strconv2 "strconv"
|
||||
import reflect5 "reflect"
|
||||
|
||||
import fmt8 "fmt"
|
||||
import fmt11 "fmt"
|
||||
import bytes2 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type AppendEntriesResponse struct {
|
||||
|
@ -94,7 +93,7 @@ func (m *AppendEntriesResponse) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt8.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -111,7 +110,7 @@ func (m *AppendEntriesResponse) Unmarshal(data []byte) error {
|
|||
m.Term = &v
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt8.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -128,7 +127,7 @@ func (m *AppendEntriesResponse) Unmarshal(data []byte) error {
|
|||
m.Index = &v
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt8.Errorf("proto: wrong wireType = %d for field CommitIndex", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -145,7 +144,7 @@ func (m *AppendEntriesResponse) Unmarshal(data []byte) error {
|
|||
m.CommitIndex = &v
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt8.Errorf("proto: wrong wireType = %d for field Success", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -175,6 +174,9 @@ func (m *AppendEntriesResponse) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io2.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -190,7 +192,7 @@ func (this *AppendEntriesResponse) String() string {
|
|||
`Index:` + valueToStringAppendEntriesResponses(this.Index) + `,`,
|
||||
`CommitIndex:` + valueToStringAppendEntriesResponses(this.CommitIndex) + `,`,
|
||||
`Success:` + valueToStringAppendEntriesResponses(this.Success) + `,`,
|
||||
`XXX_unrecognized:` + fmt6.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -201,7 +203,7 @@ func valueToStringAppendEntriesResponses(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect4.Indirect(rv).Interface()
|
||||
return fmt6.Sprintf("*%v", pv)
|
||||
return fmt9.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *AppendEntriesResponse) Size() (n int) {
|
||||
var l int
|
||||
|
@ -236,7 +238,6 @@ func sovAppendEntriesResponses(x uint64) (n int) {
|
|||
}
|
||||
func sozAppendEntriesResponses(x uint64) (n int) {
|
||||
return sovAppendEntriesResponses(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovAppendEntriesResponses(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedAppendEntriesResponse(r randyAppendEntriesResponses, easy bool) *AppendEntriesResponse {
|
||||
this := &AppendEntriesResponse{}
|
||||
|
@ -295,7 +296,11 @@ func randFieldAppendEntriesResponses(data []byte, r randyAppendEntriesResponses,
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateAppendEntriesResponses(data, uint64(key))
|
||||
data = encodeVarintPopulateAppendEntriesResponses(data, uint64(r.Int63()))
|
||||
v6 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v6 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateAppendEntriesResponses(data, uint64(v6))
|
||||
case 1:
|
||||
data = encodeVarintPopulateAppendEntriesResponses(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -396,7 +401,7 @@ func (this *AppendEntriesResponse) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings5.Join([]string{`&protobuf.AppendEntriesResponse{` + `Term:` + valueToGoStringAppendEntriesResponses(this.Term, "uint64"), `Index:` + valueToGoStringAppendEntriesResponses(this.Index, "uint64"), `CommitIndex:` + valueToGoStringAppendEntriesResponses(this.CommitIndex, "uint64"), `Success:` + valueToGoStringAppendEntriesResponses(this.Success, "bool"), `XXX_unrecognized:` + fmt7.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings5.Join([]string{`&protobuf.AppendEntriesResponse{` + `Term:` + valueToGoStringAppendEntriesResponses(this.Term, "uint64"), `Index:` + valueToGoStringAppendEntriesResponses(this.Index, "uint64"), `CommitIndex:` + valueToGoStringAppendEntriesResponses(this.CommitIndex, "uint64"), `Success:` + valueToGoStringAppendEntriesResponses(this.Success, "bool"), `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringAppendEntriesResponses(v interface{}, typ string) string {
|
||||
|
@ -405,7 +410,7 @@ func valueToGoStringAppendEntriesResponses(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect5.Indirect(rv).Interface()
|
||||
return fmt7.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt10.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringAppendEntriesResponses(e map[int32]code_google_com_p_gogoprotobuf_proto5.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -429,59 +434,59 @@ func (this *AppendEntriesResponse) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt8.Errorf("that == nil && this != nil")
|
||||
return fmt11.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*AppendEntriesResponse)
|
||||
if !ok {
|
||||
return fmt8.Errorf("that is not of type *AppendEntriesResponse")
|
||||
return fmt11.Errorf("that is not of type *AppendEntriesResponse")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt8.Errorf("that is type *AppendEntriesResponse but is nil && this != nil")
|
||||
return fmt11.Errorf("that is type *AppendEntriesResponse but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt8.Errorf("that is type *AppendEntriesResponsebut is not nil && this == nil")
|
||||
return fmt11.Errorf("that is type *AppendEntriesResponsebut is not nil && this == nil")
|
||||
}
|
||||
if this.Term != nil && that1.Term != nil {
|
||||
if *this.Term != *that1.Term {
|
||||
return fmt8.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
return fmt11.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
}
|
||||
} else if this.Term != nil {
|
||||
return fmt8.Errorf("this.Term == nil && that.Term != nil")
|
||||
return fmt11.Errorf("this.Term == nil && that.Term != nil")
|
||||
} else if that1.Term != nil {
|
||||
return fmt8.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
return fmt11.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
}
|
||||
if this.Index != nil && that1.Index != nil {
|
||||
if *this.Index != *that1.Index {
|
||||
return fmt8.Errorf("Index this(%v) Not Equal that(%v)", *this.Index, *that1.Index)
|
||||
return fmt11.Errorf("Index this(%v) Not Equal that(%v)", *this.Index, *that1.Index)
|
||||
}
|
||||
} else if this.Index != nil {
|
||||
return fmt8.Errorf("this.Index == nil && that.Index != nil")
|
||||
return fmt11.Errorf("this.Index == nil && that.Index != nil")
|
||||
} else if that1.Index != nil {
|
||||
return fmt8.Errorf("Index this(%v) Not Equal that(%v)", this.Index, that1.Index)
|
||||
return fmt11.Errorf("Index this(%v) Not Equal that(%v)", this.Index, that1.Index)
|
||||
}
|
||||
if this.CommitIndex != nil && that1.CommitIndex != nil {
|
||||
if *this.CommitIndex != *that1.CommitIndex {
|
||||
return fmt8.Errorf("CommitIndex this(%v) Not Equal that(%v)", *this.CommitIndex, *that1.CommitIndex)
|
||||
return fmt11.Errorf("CommitIndex this(%v) Not Equal that(%v)", *this.CommitIndex, *that1.CommitIndex)
|
||||
}
|
||||
} else if this.CommitIndex != nil {
|
||||
return fmt8.Errorf("this.CommitIndex == nil && that.CommitIndex != nil")
|
||||
return fmt11.Errorf("this.CommitIndex == nil && that.CommitIndex != nil")
|
||||
} else if that1.CommitIndex != nil {
|
||||
return fmt8.Errorf("CommitIndex this(%v) Not Equal that(%v)", this.CommitIndex, that1.CommitIndex)
|
||||
return fmt11.Errorf("CommitIndex this(%v) Not Equal that(%v)", this.CommitIndex, that1.CommitIndex)
|
||||
}
|
||||
if this.Success != nil && that1.Success != nil {
|
||||
if *this.Success != *that1.Success {
|
||||
return fmt8.Errorf("Success this(%v) Not Equal that(%v)", *this.Success, *that1.Success)
|
||||
return fmt11.Errorf("Success this(%v) Not Equal that(%v)", *this.Success, *that1.Success)
|
||||
}
|
||||
} else if this.Success != nil {
|
||||
return fmt8.Errorf("this.Success == nil && that.Success != nil")
|
||||
return fmt11.Errorf("this.Success == nil && that.Success != nil")
|
||||
} else if that1.Success != nil {
|
||||
return fmt8.Errorf("Success this(%v) Not Equal that(%v)", this.Success, that1.Success)
|
||||
return fmt11.Errorf("Success this(%v) Not Equal that(%v)", this.Success, that1.Success)
|
||||
}
|
||||
if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt8.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io "io"
|
||||
import fmt "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt "fmt"
|
||||
import fmt1 "fmt"
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
import fmt1 "fmt"
|
||||
import fmt2 "fmt"
|
||||
import strings1 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto1 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort "sort"
|
||||
import strconv "strconv"
|
||||
import reflect1 "reflect"
|
||||
|
||||
import fmt2 "fmt"
|
||||
import fmt3 "fmt"
|
||||
import bytes "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type LogEntry struct {
|
||||
|
@ -94,7 +93,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -111,7 +110,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
|
|||
m.Index = &v
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -128,7 +127,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
|
|||
m.Term = &v
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CommandName", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -151,7 +150,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
|
|||
index = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -185,6 +184,9 @@ func (m *LogEntry) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -200,7 +202,7 @@ func (this *LogEntry) String() string {
|
|||
`Term:` + valueToStringLogEntry(this.Term) + `,`,
|
||||
`CommandName:` + valueToStringLogEntry(this.CommandName) + `,`,
|
||||
`Command:` + valueToStringLogEntry(this.Command) + `,`,
|
||||
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -211,7 +213,7 @@ func valueToStringLogEntry(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
return fmt1.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *LogEntry) Size() (n int) {
|
||||
var l int
|
||||
|
@ -248,7 +250,6 @@ func sovLogEntry(x uint64) (n int) {
|
|||
}
|
||||
func sozLogEntry(x uint64) (n int) {
|
||||
return sovLogEntry(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovLogEntry(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedLogEntry(r randyLogEntry, easy bool) *LogEntry {
|
||||
this := &LogEntry{}
|
||||
|
@ -312,7 +313,11 @@ func randFieldLogEntry(data []byte, r randyLogEntry, fieldNumber int, wire int)
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateLogEntry(data, uint64(key))
|
||||
data = encodeVarintPopulateLogEntry(data, uint64(r.Int63()))
|
||||
v6 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v6 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateLogEntry(data, uint64(v6))
|
||||
case 1:
|
||||
data = encodeVarintPopulateLogEntry(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -410,7 +415,7 @@ func (this *LogEntry) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings1.Join([]string{`&protobuf.LogEntry{` + `Index:` + valueToGoStringLogEntry(this.Index, "uint64"), `Term:` + valueToGoStringLogEntry(this.Term, "uint64"), `CommandName:` + valueToGoStringLogEntry(this.CommandName, "string"), `Command:` + valueToGoStringLogEntry(this.Command, "byte"), `XXX_unrecognized:` + fmt1.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings1.Join([]string{`&protobuf.LogEntry{` + `Index:` + valueToGoStringLogEntry(this.Index, "uint64"), `Term:` + valueToGoStringLogEntry(this.Term, "uint64"), `CommandName:` + valueToGoStringLogEntry(this.CommandName, "string"), `Command:` + valueToGoStringLogEntry(this.Command, "byte"), `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringLogEntry(v interface{}, typ string) string {
|
||||
|
@ -419,7 +424,7 @@ func valueToGoStringLogEntry(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect1.Indirect(rv).Interface()
|
||||
return fmt1.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt2.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringLogEntry(e map[int32]code_google_com_p_gogoprotobuf_proto1.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -443,53 +448,53 @@ func (this *LogEntry) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt2.Errorf("that == nil && this != nil")
|
||||
return fmt3.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*LogEntry)
|
||||
if !ok {
|
||||
return fmt2.Errorf("that is not of type *LogEntry")
|
||||
return fmt3.Errorf("that is not of type *LogEntry")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt2.Errorf("that is type *LogEntry but is nil && this != nil")
|
||||
return fmt3.Errorf("that is type *LogEntry but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt2.Errorf("that is type *LogEntrybut is not nil && this == nil")
|
||||
return fmt3.Errorf("that is type *LogEntrybut is not nil && this == nil")
|
||||
}
|
||||
if this.Index != nil && that1.Index != nil {
|
||||
if *this.Index != *that1.Index {
|
||||
return fmt2.Errorf("Index this(%v) Not Equal that(%v)", *this.Index, *that1.Index)
|
||||
return fmt3.Errorf("Index this(%v) Not Equal that(%v)", *this.Index, *that1.Index)
|
||||
}
|
||||
} else if this.Index != nil {
|
||||
return fmt2.Errorf("this.Index == nil && that.Index != nil")
|
||||
return fmt3.Errorf("this.Index == nil && that.Index != nil")
|
||||
} else if that1.Index != nil {
|
||||
return fmt2.Errorf("Index this(%v) Not Equal that(%v)", this.Index, that1.Index)
|
||||
return fmt3.Errorf("Index this(%v) Not Equal that(%v)", this.Index, that1.Index)
|
||||
}
|
||||
if this.Term != nil && that1.Term != nil {
|
||||
if *this.Term != *that1.Term {
|
||||
return fmt2.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
return fmt3.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
}
|
||||
} else if this.Term != nil {
|
||||
return fmt2.Errorf("this.Term == nil && that.Term != nil")
|
||||
return fmt3.Errorf("this.Term == nil && that.Term != nil")
|
||||
} else if that1.Term != nil {
|
||||
return fmt2.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
return fmt3.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
}
|
||||
if this.CommandName != nil && that1.CommandName != nil {
|
||||
if *this.CommandName != *that1.CommandName {
|
||||
return fmt2.Errorf("CommandName this(%v) Not Equal that(%v)", *this.CommandName, *that1.CommandName)
|
||||
return fmt3.Errorf("CommandName this(%v) Not Equal that(%v)", *this.CommandName, *that1.CommandName)
|
||||
}
|
||||
} else if this.CommandName != nil {
|
||||
return fmt2.Errorf("this.CommandName == nil && that.CommandName != nil")
|
||||
return fmt3.Errorf("this.CommandName == nil && that.CommandName != nil")
|
||||
} else if that1.CommandName != nil {
|
||||
return fmt2.Errorf("CommandName this(%v) Not Equal that(%v)", this.CommandName, that1.CommandName)
|
||||
return fmt3.Errorf("CommandName this(%v) Not Equal that(%v)", this.CommandName, that1.CommandName)
|
||||
}
|
||||
if !bytes.Equal(this.Command, that1.Command) {
|
||||
return fmt2.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command)
|
||||
return fmt3.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command)
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt2.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io3 "io"
|
||||
import fmt12 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto6 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt9 "fmt"
|
||||
import fmt13 "fmt"
|
||||
import strings6 "strings"
|
||||
import reflect6 "reflect"
|
||||
|
||||
import fmt10 "fmt"
|
||||
import fmt14 "fmt"
|
||||
import strings7 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto7 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort3 "sort"
|
||||
import strconv3 "strconv"
|
||||
import reflect7 "reflect"
|
||||
|
||||
import fmt11 "fmt"
|
||||
import fmt15 "fmt"
|
||||
import bytes3 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type RequestVoteRequest struct {
|
||||
|
@ -94,7 +93,7 @@ func (m *RequestVoteRequest) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt12.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -111,7 +110,7 @@ func (m *RequestVoteRequest) Unmarshal(data []byte) error {
|
|||
m.Term = &v
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt12.Errorf("proto: wrong wireType = %d for field LastLogIndex", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -128,7 +127,7 @@ func (m *RequestVoteRequest) Unmarshal(data []byte) error {
|
|||
m.LastLogIndex = &v
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt12.Errorf("proto: wrong wireType = %d for field LastLogTerm", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -145,7 +144,7 @@ func (m *RequestVoteRequest) Unmarshal(data []byte) error {
|
|||
m.LastLogTerm = &v
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt12.Errorf("proto: wrong wireType = %d for field CandidateName", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -180,6 +179,9 @@ func (m *RequestVoteRequest) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io3.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -195,7 +197,7 @@ func (this *RequestVoteRequest) String() string {
|
|||
`LastLogIndex:` + valueToStringRequestVoteRequest(this.LastLogIndex) + `,`,
|
||||
`LastLogTerm:` + valueToStringRequestVoteRequest(this.LastLogTerm) + `,`,
|
||||
`CandidateName:` + valueToStringRequestVoteRequest(this.CandidateName) + `,`,
|
||||
`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt13.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -206,7 +208,7 @@ func valueToStringRequestVoteRequest(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect6.Indirect(rv).Interface()
|
||||
return fmt9.Sprintf("*%v", pv)
|
||||
return fmt13.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *RequestVoteRequest) Size() (n int) {
|
||||
var l int
|
||||
|
@ -242,7 +244,6 @@ func sovRequestVoteRequest(x uint64) (n int) {
|
|||
}
|
||||
func sozRequestVoteRequest(x uint64) (n int) {
|
||||
return sovRequestVoteRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovRequestVoteRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedRequestVoteRequest(r randyRequestVoteRequest, easy bool) *RequestVoteRequest {
|
||||
this := &RequestVoteRequest{}
|
||||
|
@ -301,7 +302,11 @@ func randFieldRequestVoteRequest(data []byte, r randyRequestVoteRequest, fieldNu
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateRequestVoteRequest(data, uint64(key))
|
||||
data = encodeVarintPopulateRequestVoteRequest(data, uint64(r.Int63()))
|
||||
v6 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v6 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateRequestVoteRequest(data, uint64(v6))
|
||||
case 1:
|
||||
data = encodeVarintPopulateRequestVoteRequest(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -398,7 +403,7 @@ func (this *RequestVoteRequest) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings7.Join([]string{`&protobuf.RequestVoteRequest{` + `Term:` + valueToGoStringRequestVoteRequest(this.Term, "uint64"), `LastLogIndex:` + valueToGoStringRequestVoteRequest(this.LastLogIndex, "uint64"), `LastLogTerm:` + valueToGoStringRequestVoteRequest(this.LastLogTerm, "uint64"), `CandidateName:` + valueToGoStringRequestVoteRequest(this.CandidateName, "string"), `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings7.Join([]string{`&protobuf.RequestVoteRequest{` + `Term:` + valueToGoStringRequestVoteRequest(this.Term, "uint64"), `LastLogIndex:` + valueToGoStringRequestVoteRequest(this.LastLogIndex, "uint64"), `LastLogTerm:` + valueToGoStringRequestVoteRequest(this.LastLogTerm, "uint64"), `CandidateName:` + valueToGoStringRequestVoteRequest(this.CandidateName, "string"), `XXX_unrecognized:` + fmt14.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringRequestVoteRequest(v interface{}, typ string) string {
|
||||
|
@ -407,7 +412,7 @@ func valueToGoStringRequestVoteRequest(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect7.Indirect(rv).Interface()
|
||||
return fmt10.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt14.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringRequestVoteRequest(e map[int32]code_google_com_p_gogoprotobuf_proto7.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -431,59 +436,59 @@ func (this *RequestVoteRequest) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt11.Errorf("that == nil && this != nil")
|
||||
return fmt15.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*RequestVoteRequest)
|
||||
if !ok {
|
||||
return fmt11.Errorf("that is not of type *RequestVoteRequest")
|
||||
return fmt15.Errorf("that is not of type *RequestVoteRequest")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt11.Errorf("that is type *RequestVoteRequest but is nil && this != nil")
|
||||
return fmt15.Errorf("that is type *RequestVoteRequest but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt11.Errorf("that is type *RequestVoteRequestbut is not nil && this == nil")
|
||||
return fmt15.Errorf("that is type *RequestVoteRequestbut is not nil && this == nil")
|
||||
}
|
||||
if this.Term != nil && that1.Term != nil {
|
||||
if *this.Term != *that1.Term {
|
||||
return fmt11.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
return fmt15.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
}
|
||||
} else if this.Term != nil {
|
||||
return fmt11.Errorf("this.Term == nil && that.Term != nil")
|
||||
return fmt15.Errorf("this.Term == nil && that.Term != nil")
|
||||
} else if that1.Term != nil {
|
||||
return fmt11.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
return fmt15.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
}
|
||||
if this.LastLogIndex != nil && that1.LastLogIndex != nil {
|
||||
if *this.LastLogIndex != *that1.LastLogIndex {
|
||||
return fmt11.Errorf("LastLogIndex this(%v) Not Equal that(%v)", *this.LastLogIndex, *that1.LastLogIndex)
|
||||
return fmt15.Errorf("LastLogIndex this(%v) Not Equal that(%v)", *this.LastLogIndex, *that1.LastLogIndex)
|
||||
}
|
||||
} else if this.LastLogIndex != nil {
|
||||
return fmt11.Errorf("this.LastLogIndex == nil && that.LastLogIndex != nil")
|
||||
return fmt15.Errorf("this.LastLogIndex == nil && that.LastLogIndex != nil")
|
||||
} else if that1.LastLogIndex != nil {
|
||||
return fmt11.Errorf("LastLogIndex this(%v) Not Equal that(%v)", this.LastLogIndex, that1.LastLogIndex)
|
||||
return fmt15.Errorf("LastLogIndex this(%v) Not Equal that(%v)", this.LastLogIndex, that1.LastLogIndex)
|
||||
}
|
||||
if this.LastLogTerm != nil && that1.LastLogTerm != nil {
|
||||
if *this.LastLogTerm != *that1.LastLogTerm {
|
||||
return fmt11.Errorf("LastLogTerm this(%v) Not Equal that(%v)", *this.LastLogTerm, *that1.LastLogTerm)
|
||||
return fmt15.Errorf("LastLogTerm this(%v) Not Equal that(%v)", *this.LastLogTerm, *that1.LastLogTerm)
|
||||
}
|
||||
} else if this.LastLogTerm != nil {
|
||||
return fmt11.Errorf("this.LastLogTerm == nil && that.LastLogTerm != nil")
|
||||
return fmt15.Errorf("this.LastLogTerm == nil && that.LastLogTerm != nil")
|
||||
} else if that1.LastLogTerm != nil {
|
||||
return fmt11.Errorf("LastLogTerm this(%v) Not Equal that(%v)", this.LastLogTerm, that1.LastLogTerm)
|
||||
return fmt15.Errorf("LastLogTerm this(%v) Not Equal that(%v)", this.LastLogTerm, that1.LastLogTerm)
|
||||
}
|
||||
if this.CandidateName != nil && that1.CandidateName != nil {
|
||||
if *this.CandidateName != *that1.CandidateName {
|
||||
return fmt11.Errorf("CandidateName this(%v) Not Equal that(%v)", *this.CandidateName, *that1.CandidateName)
|
||||
return fmt15.Errorf("CandidateName this(%v) Not Equal that(%v)", *this.CandidateName, *that1.CandidateName)
|
||||
}
|
||||
} else if this.CandidateName != nil {
|
||||
return fmt11.Errorf("this.CandidateName == nil && that.CandidateName != nil")
|
||||
return fmt15.Errorf("this.CandidateName == nil && that.CandidateName != nil")
|
||||
} else if that1.CandidateName != nil {
|
||||
return fmt11.Errorf("CandidateName this(%v) Not Equal that(%v)", this.CandidateName, that1.CandidateName)
|
||||
return fmt15.Errorf("CandidateName this(%v) Not Equal that(%v)", this.CandidateName, that1.CandidateName)
|
||||
}
|
||||
if !bytes3.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt15.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io4 "io"
|
||||
import fmt16 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto8 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt12 "fmt"
|
||||
import fmt17 "fmt"
|
||||
import strings8 "strings"
|
||||
import reflect8 "reflect"
|
||||
|
||||
import fmt13 "fmt"
|
||||
import fmt18 "fmt"
|
||||
import strings9 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto9 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort4 "sort"
|
||||
import strconv4 "strconv"
|
||||
import reflect9 "reflect"
|
||||
|
||||
import fmt14 "fmt"
|
||||
import fmt19 "fmt"
|
||||
import bytes4 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type RequestVoteResponse struct {
|
||||
|
@ -78,7 +77,7 @@ func (m *RequestVoteResponse) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt16.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -95,7 +94,7 @@ func (m *RequestVoteResponse) Unmarshal(data []byte) error {
|
|||
m.Term = &v
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt16.Errorf("proto: wrong wireType = %d for field VoteGranted", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -125,6 +124,9 @@ func (m *RequestVoteResponse) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io4.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -138,7 +140,7 @@ func (this *RequestVoteResponse) String() string {
|
|||
s := strings8.Join([]string{`&RequestVoteResponse{`,
|
||||
`Term:` + valueToStringRequestVoteResponses(this.Term) + `,`,
|
||||
`VoteGranted:` + valueToStringRequestVoteResponses(this.VoteGranted) + `,`,
|
||||
`XXX_unrecognized:` + fmt12.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt17.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -149,7 +151,7 @@ func valueToStringRequestVoteResponses(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect8.Indirect(rv).Interface()
|
||||
return fmt12.Sprintf("*%v", pv)
|
||||
return fmt17.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *RequestVoteResponse) Size() (n int) {
|
||||
var l int
|
||||
|
@ -178,7 +180,6 @@ func sovRequestVoteResponses(x uint64) (n int) {
|
|||
}
|
||||
func sozRequestVoteResponses(x uint64) (n int) {
|
||||
return sovRequestVoteResponses(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovRequestVoteResponses(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedRequestVoteResponse(r randyRequestVoteResponses, easy bool) *RequestVoteResponse {
|
||||
this := &RequestVoteResponse{}
|
||||
|
@ -233,7 +234,11 @@ func randFieldRequestVoteResponses(data []byte, r randyRequestVoteResponses, fie
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateRequestVoteResponses(data, uint64(key))
|
||||
data = encodeVarintPopulateRequestVoteResponses(data, uint64(r.Int63()))
|
||||
v4 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v4 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateRequestVoteResponses(data, uint64(v4))
|
||||
case 1:
|
||||
data = encodeVarintPopulateRequestVoteResponses(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -324,7 +329,7 @@ func (this *RequestVoteResponse) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings9.Join([]string{`&protobuf.RequestVoteResponse{` + `Term:` + valueToGoStringRequestVoteResponses(this.Term, "uint64"), `VoteGranted:` + valueToGoStringRequestVoteResponses(this.VoteGranted, "bool"), `XXX_unrecognized:` + fmt13.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings9.Join([]string{`&protobuf.RequestVoteResponse{` + `Term:` + valueToGoStringRequestVoteResponses(this.Term, "uint64"), `VoteGranted:` + valueToGoStringRequestVoteResponses(this.VoteGranted, "bool"), `XXX_unrecognized:` + fmt18.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringRequestVoteResponses(v interface{}, typ string) string {
|
||||
|
@ -333,7 +338,7 @@ func valueToGoStringRequestVoteResponses(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect9.Indirect(rv).Interface()
|
||||
return fmt13.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt18.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringRequestVoteResponses(e map[int32]code_google_com_p_gogoprotobuf_proto9.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -357,41 +362,41 @@ func (this *RequestVoteResponse) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt14.Errorf("that == nil && this != nil")
|
||||
return fmt19.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*RequestVoteResponse)
|
||||
if !ok {
|
||||
return fmt14.Errorf("that is not of type *RequestVoteResponse")
|
||||
return fmt19.Errorf("that is not of type *RequestVoteResponse")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt14.Errorf("that is type *RequestVoteResponse but is nil && this != nil")
|
||||
return fmt19.Errorf("that is type *RequestVoteResponse but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt14.Errorf("that is type *RequestVoteResponsebut is not nil && this == nil")
|
||||
return fmt19.Errorf("that is type *RequestVoteResponsebut is not nil && this == nil")
|
||||
}
|
||||
if this.Term != nil && that1.Term != nil {
|
||||
if *this.Term != *that1.Term {
|
||||
return fmt14.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
return fmt19.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
}
|
||||
} else if this.Term != nil {
|
||||
return fmt14.Errorf("this.Term == nil && that.Term != nil")
|
||||
return fmt19.Errorf("this.Term == nil && that.Term != nil")
|
||||
} else if that1.Term != nil {
|
||||
return fmt14.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
return fmt19.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
}
|
||||
if this.VoteGranted != nil && that1.VoteGranted != nil {
|
||||
if *this.VoteGranted != *that1.VoteGranted {
|
||||
return fmt14.Errorf("VoteGranted this(%v) Not Equal that(%v)", *this.VoteGranted, *that1.VoteGranted)
|
||||
return fmt19.Errorf("VoteGranted this(%v) Not Equal that(%v)", *this.VoteGranted, *that1.VoteGranted)
|
||||
}
|
||||
} else if this.VoteGranted != nil {
|
||||
return fmt14.Errorf("this.VoteGranted == nil && that.VoteGranted != nil")
|
||||
return fmt19.Errorf("this.VoteGranted == nil && that.VoteGranted != nil")
|
||||
} else if that1.VoteGranted != nil {
|
||||
return fmt14.Errorf("VoteGranted this(%v) Not Equal that(%v)", this.VoteGranted, that1.VoteGranted)
|
||||
return fmt19.Errorf("VoteGranted this(%v) Not Equal that(%v)", this.VoteGranted, that1.VoteGranted)
|
||||
}
|
||||
if !bytes4.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt14.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt19.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io5 "io"
|
||||
import fmt20 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto10 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt15 "fmt"
|
||||
import fmt21 "fmt"
|
||||
import strings10 "strings"
|
||||
import reflect10 "reflect"
|
||||
|
||||
import fmt16 "fmt"
|
||||
import fmt22 "fmt"
|
||||
import strings11 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto11 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort5 "sort"
|
||||
import strconv5 "strconv"
|
||||
import reflect11 "reflect"
|
||||
|
||||
import fmt17 "fmt"
|
||||
import fmt23 "fmt"
|
||||
import bytes5 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type SnapshotRecoveryRequest struct {
|
||||
|
@ -125,7 +124,7 @@ func (m *SnapshotRecoveryRequest) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt20.Errorf("proto: wrong wireType = %d for field LeaderName", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -148,7 +147,7 @@ func (m *SnapshotRecoveryRequest) Unmarshal(data []byte) error {
|
|||
index = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt20.Errorf("proto: wrong wireType = %d for field LastIndex", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -165,7 +164,7 @@ func (m *SnapshotRecoveryRequest) Unmarshal(data []byte) error {
|
|||
m.LastIndex = &v
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt20.Errorf("proto: wrong wireType = %d for field LastTerm", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -182,7 +181,7 @@ func (m *SnapshotRecoveryRequest) Unmarshal(data []byte) error {
|
|||
m.LastTerm = &v
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt20.Errorf("proto: wrong wireType = %d for field Peers", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -205,7 +204,7 @@ func (m *SnapshotRecoveryRequest) Unmarshal(data []byte) error {
|
|||
index = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt20.Errorf("proto: wrong wireType = %d for field State", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -239,6 +238,9 @@ func (m *SnapshotRecoveryRequest) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io5.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -266,7 +268,7 @@ func (m *SnapshotRecoveryRequest_Peer) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt20.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -289,7 +291,7 @@ func (m *SnapshotRecoveryRequest_Peer) Unmarshal(data []byte) error {
|
|||
index = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt20.Errorf("proto: wrong wireType = %d for field ConnectionString", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -324,6 +326,9 @@ func (m *SnapshotRecoveryRequest_Peer) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io5.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -338,9 +343,9 @@ func (this *SnapshotRecoveryRequest) String() string {
|
|||
`LeaderName:` + valueToStringSnapshotRecoveryRequest(this.LeaderName) + `,`,
|
||||
`LastIndex:` + valueToStringSnapshotRecoveryRequest(this.LastIndex) + `,`,
|
||||
`LastTerm:` + valueToStringSnapshotRecoveryRequest(this.LastTerm) + `,`,
|
||||
`Peers:` + strings10.Replace(fmt15.Sprintf("%v", this.Peers), "SnapshotRecoveryRequest_Peer", "SnapshotRecoveryRequest_Peer", 1) + `,`,
|
||||
`Peers:` + strings10.Replace(fmt21.Sprintf("%v", this.Peers), "SnapshotRecoveryRequest_Peer", "SnapshotRecoveryRequest_Peer", 1) + `,`,
|
||||
`State:` + valueToStringSnapshotRecoveryRequest(this.State) + `,`,
|
||||
`XXX_unrecognized:` + fmt15.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt21.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -352,7 +357,7 @@ func (this *SnapshotRecoveryRequest_Peer) String() string {
|
|||
s := strings10.Join([]string{`&SnapshotRecoveryRequest_Peer{`,
|
||||
`Name:` + valueToStringSnapshotRecoveryRequest(this.Name) + `,`,
|
||||
`ConnectionString:` + valueToStringSnapshotRecoveryRequest(this.ConnectionString) + `,`,
|
||||
`XXX_unrecognized:` + fmt15.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt21.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -363,7 +368,7 @@ func valueToStringSnapshotRecoveryRequest(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect10.Indirect(rv).Interface()
|
||||
return fmt15.Sprintf("*%v", pv)
|
||||
return fmt21.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *SnapshotRecoveryRequest) Size() (n int) {
|
||||
var l int
|
||||
|
@ -422,7 +427,6 @@ func sovSnapshotRecoveryRequest(x uint64) (n int) {
|
|||
}
|
||||
func sozSnapshotRecoveryRequest(x uint64) (n int) {
|
||||
return sovSnapshotRecoveryRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovSnapshotRecoveryRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedSnapshotRecoveryRequest(r randySnapshotRecoveryRequest, easy bool) *SnapshotRecoveryRequest {
|
||||
this := &SnapshotRecoveryRequest{}
|
||||
|
@ -503,7 +507,11 @@ func randFieldSnapshotRecoveryRequest(data []byte, r randySnapshotRecoveryReques
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(key))
|
||||
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(r.Int63()))
|
||||
v9 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v9 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(v9))
|
||||
case 1:
|
||||
data = encodeVarintPopulateSnapshotRecoveryRequest(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -645,14 +653,14 @@ func (this *SnapshotRecoveryRequest) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings11.Join([]string{`&protobuf.SnapshotRecoveryRequest{` + `LeaderName:` + valueToGoStringSnapshotRecoveryRequest(this.LeaderName, "string"), `LastIndex:` + valueToGoStringSnapshotRecoveryRequest(this.LastIndex, "uint64"), `LastTerm:` + valueToGoStringSnapshotRecoveryRequest(this.LastTerm, "uint64"), `Peers:` + fmt16.Sprintf("%#v", this.Peers), `State:` + valueToGoStringSnapshotRecoveryRequest(this.State, "byte"), `XXX_unrecognized:` + fmt16.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings11.Join([]string{`&protobuf.SnapshotRecoveryRequest{` + `LeaderName:` + valueToGoStringSnapshotRecoveryRequest(this.LeaderName, "string"), `LastIndex:` + valueToGoStringSnapshotRecoveryRequest(this.LastIndex, "uint64"), `LastTerm:` + valueToGoStringSnapshotRecoveryRequest(this.LastTerm, "uint64"), `Peers:` + fmt22.Sprintf("%#v", this.Peers), `State:` + valueToGoStringSnapshotRecoveryRequest(this.State, "byte"), `XXX_unrecognized:` + fmt22.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func (this *SnapshotRecoveryRequest_Peer) GoString() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings11.Join([]string{`&protobuf.SnapshotRecoveryRequest_Peer{` + `Name:` + valueToGoStringSnapshotRecoveryRequest(this.Name, "string"), `ConnectionString:` + valueToGoStringSnapshotRecoveryRequest(this.ConnectionString, "string"), `XXX_unrecognized:` + fmt16.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings11.Join([]string{`&protobuf.SnapshotRecoveryRequest_Peer{` + `Name:` + valueToGoStringSnapshotRecoveryRequest(this.Name, "string"), `ConnectionString:` + valueToGoStringSnapshotRecoveryRequest(this.ConnectionString, "string"), `XXX_unrecognized:` + fmt22.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringSnapshotRecoveryRequest(v interface{}, typ string) string {
|
||||
|
@ -661,7 +669,7 @@ func valueToGoStringSnapshotRecoveryRequest(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect11.Indirect(rv).Interface()
|
||||
return fmt16.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt22.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringSnapshotRecoveryRequest(e map[int32]code_google_com_p_gogoprotobuf_proto11.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -685,61 +693,61 @@ func (this *SnapshotRecoveryRequest) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt17.Errorf("that == nil && this != nil")
|
||||
return fmt23.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*SnapshotRecoveryRequest)
|
||||
if !ok {
|
||||
return fmt17.Errorf("that is not of type *SnapshotRecoveryRequest")
|
||||
return fmt23.Errorf("that is not of type *SnapshotRecoveryRequest")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt17.Errorf("that is type *SnapshotRecoveryRequest but is nil && this != nil")
|
||||
return fmt23.Errorf("that is type *SnapshotRecoveryRequest but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt17.Errorf("that is type *SnapshotRecoveryRequestbut is not nil && this == nil")
|
||||
return fmt23.Errorf("that is type *SnapshotRecoveryRequestbut is not nil && this == nil")
|
||||
}
|
||||
if this.LeaderName != nil && that1.LeaderName != nil {
|
||||
if *this.LeaderName != *that1.LeaderName {
|
||||
return fmt17.Errorf("LeaderName this(%v) Not Equal that(%v)", *this.LeaderName, *that1.LeaderName)
|
||||
return fmt23.Errorf("LeaderName this(%v) Not Equal that(%v)", *this.LeaderName, *that1.LeaderName)
|
||||
}
|
||||
} else if this.LeaderName != nil {
|
||||
return fmt17.Errorf("this.LeaderName == nil && that.LeaderName != nil")
|
||||
return fmt23.Errorf("this.LeaderName == nil && that.LeaderName != nil")
|
||||
} else if that1.LeaderName != nil {
|
||||
return fmt17.Errorf("LeaderName this(%v) Not Equal that(%v)", this.LeaderName, that1.LeaderName)
|
||||
return fmt23.Errorf("LeaderName this(%v) Not Equal that(%v)", this.LeaderName, that1.LeaderName)
|
||||
}
|
||||
if this.LastIndex != nil && that1.LastIndex != nil {
|
||||
if *this.LastIndex != *that1.LastIndex {
|
||||
return fmt17.Errorf("LastIndex this(%v) Not Equal that(%v)", *this.LastIndex, *that1.LastIndex)
|
||||
return fmt23.Errorf("LastIndex this(%v) Not Equal that(%v)", *this.LastIndex, *that1.LastIndex)
|
||||
}
|
||||
} else if this.LastIndex != nil {
|
||||
return fmt17.Errorf("this.LastIndex == nil && that.LastIndex != nil")
|
||||
return fmt23.Errorf("this.LastIndex == nil && that.LastIndex != nil")
|
||||
} else if that1.LastIndex != nil {
|
||||
return fmt17.Errorf("LastIndex this(%v) Not Equal that(%v)", this.LastIndex, that1.LastIndex)
|
||||
return fmt23.Errorf("LastIndex this(%v) Not Equal that(%v)", this.LastIndex, that1.LastIndex)
|
||||
}
|
||||
if this.LastTerm != nil && that1.LastTerm != nil {
|
||||
if *this.LastTerm != *that1.LastTerm {
|
||||
return fmt17.Errorf("LastTerm this(%v) Not Equal that(%v)", *this.LastTerm, *that1.LastTerm)
|
||||
return fmt23.Errorf("LastTerm this(%v) Not Equal that(%v)", *this.LastTerm, *that1.LastTerm)
|
||||
}
|
||||
} else if this.LastTerm != nil {
|
||||
return fmt17.Errorf("this.LastTerm == nil && that.LastTerm != nil")
|
||||
return fmt23.Errorf("this.LastTerm == nil && that.LastTerm != nil")
|
||||
} else if that1.LastTerm != nil {
|
||||
return fmt17.Errorf("LastTerm this(%v) Not Equal that(%v)", this.LastTerm, that1.LastTerm)
|
||||
return fmt23.Errorf("LastTerm this(%v) Not Equal that(%v)", this.LastTerm, that1.LastTerm)
|
||||
}
|
||||
if len(this.Peers) != len(that1.Peers) {
|
||||
return fmt17.Errorf("Peers this(%v) Not Equal that(%v)", len(this.Peers), len(that1.Peers))
|
||||
return fmt23.Errorf("Peers this(%v) Not Equal that(%v)", len(this.Peers), len(that1.Peers))
|
||||
}
|
||||
for i := range this.Peers {
|
||||
if !this.Peers[i].Equal(that1.Peers[i]) {
|
||||
return fmt17.Errorf("Peers this[%v](%v) Not Equal that[%v](%v)", i, this.Peers[i], i, that1.Peers[i])
|
||||
return fmt23.Errorf("Peers this[%v](%v) Not Equal that[%v](%v)", i, this.Peers[i], i, that1.Peers[i])
|
||||
}
|
||||
}
|
||||
if !bytes5.Equal(this.State, that1.State) {
|
||||
return fmt17.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State)
|
||||
return fmt23.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State)
|
||||
}
|
||||
if !bytes5.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt17.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt23.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -811,41 +819,41 @@ func (this *SnapshotRecoveryRequest_Peer) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt17.Errorf("that == nil && this != nil")
|
||||
return fmt23.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*SnapshotRecoveryRequest_Peer)
|
||||
if !ok {
|
||||
return fmt17.Errorf("that is not of type *SnapshotRecoveryRequest_Peer")
|
||||
return fmt23.Errorf("that is not of type *SnapshotRecoveryRequest_Peer")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt17.Errorf("that is type *SnapshotRecoveryRequest_Peer but is nil && this != nil")
|
||||
return fmt23.Errorf("that is type *SnapshotRecoveryRequest_Peer but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt17.Errorf("that is type *SnapshotRecoveryRequest_Peerbut is not nil && this == nil")
|
||||
return fmt23.Errorf("that is type *SnapshotRecoveryRequest_Peerbut is not nil && this == nil")
|
||||
}
|
||||
if this.Name != nil && that1.Name != nil {
|
||||
if *this.Name != *that1.Name {
|
||||
return fmt17.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name)
|
||||
return fmt23.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name)
|
||||
}
|
||||
} else if this.Name != nil {
|
||||
return fmt17.Errorf("this.Name == nil && that.Name != nil")
|
||||
return fmt23.Errorf("this.Name == nil && that.Name != nil")
|
||||
} else if that1.Name != nil {
|
||||
return fmt17.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name)
|
||||
return fmt23.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name)
|
||||
}
|
||||
if this.ConnectionString != nil && that1.ConnectionString != nil {
|
||||
if *this.ConnectionString != *that1.ConnectionString {
|
||||
return fmt17.Errorf("ConnectionString this(%v) Not Equal that(%v)", *this.ConnectionString, *that1.ConnectionString)
|
||||
return fmt23.Errorf("ConnectionString this(%v) Not Equal that(%v)", *this.ConnectionString, *that1.ConnectionString)
|
||||
}
|
||||
} else if this.ConnectionString != nil {
|
||||
return fmt17.Errorf("this.ConnectionString == nil && that.ConnectionString != nil")
|
||||
return fmt23.Errorf("this.ConnectionString == nil && that.ConnectionString != nil")
|
||||
} else if that1.ConnectionString != nil {
|
||||
return fmt17.Errorf("ConnectionString this(%v) Not Equal that(%v)", this.ConnectionString, that1.ConnectionString)
|
||||
return fmt23.Errorf("ConnectionString this(%v) Not Equal that(%v)", this.ConnectionString, that1.ConnectionString)
|
||||
}
|
||||
if !bytes5.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt17.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt23.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io6 "io"
|
||||
import fmt24 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto12 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt18 "fmt"
|
||||
import fmt25 "fmt"
|
||||
import strings12 "strings"
|
||||
import reflect12 "reflect"
|
||||
|
||||
import fmt19 "fmt"
|
||||
import fmt26 "fmt"
|
||||
import strings13 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto13 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort6 "sort"
|
||||
import strconv6 "strconv"
|
||||
import reflect13 "reflect"
|
||||
|
||||
import fmt20 "fmt"
|
||||
import fmt27 "fmt"
|
||||
import bytes6 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type SnapshotRecoveryResponse struct {
|
||||
|
@ -86,7 +85,7 @@ func (m *SnapshotRecoveryResponse) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt24.Errorf("proto: wrong wireType = %d for field Term", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -103,7 +102,7 @@ func (m *SnapshotRecoveryResponse) Unmarshal(data []byte) error {
|
|||
m.Term = &v
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt24.Errorf("proto: wrong wireType = %d for field Success", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -121,7 +120,7 @@ func (m *SnapshotRecoveryResponse) Unmarshal(data []byte) error {
|
|||
m.Success = &b
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt24.Errorf("proto: wrong wireType = %d for field CommitIndex", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -150,6 +149,9 @@ func (m *SnapshotRecoveryResponse) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io6.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -164,7 +166,7 @@ func (this *SnapshotRecoveryResponse) String() string {
|
|||
`Term:` + valueToStringSnapshotRecoveryResponse(this.Term) + `,`,
|
||||
`Success:` + valueToStringSnapshotRecoveryResponse(this.Success) + `,`,
|
||||
`CommitIndex:` + valueToStringSnapshotRecoveryResponse(this.CommitIndex) + `,`,
|
||||
`XXX_unrecognized:` + fmt18.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt25.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -175,7 +177,7 @@ func valueToStringSnapshotRecoveryResponse(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect12.Indirect(rv).Interface()
|
||||
return fmt18.Sprintf("*%v", pv)
|
||||
return fmt25.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *SnapshotRecoveryResponse) Size() (n int) {
|
||||
var l int
|
||||
|
@ -207,7 +209,6 @@ func sovSnapshotRecoveryResponse(x uint64) (n int) {
|
|||
}
|
||||
func sozSnapshotRecoveryResponse(x uint64) (n int) {
|
||||
return sovSnapshotRecoveryResponse(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovSnapshotRecoveryResponse(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedSnapshotRecoveryResponse(r randySnapshotRecoveryResponse, easy bool) *SnapshotRecoveryResponse {
|
||||
this := &SnapshotRecoveryResponse{}
|
||||
|
@ -264,7 +265,11 @@ func randFieldSnapshotRecoveryResponse(data []byte, r randySnapshotRecoveryRespo
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateSnapshotRecoveryResponse(data, uint64(key))
|
||||
data = encodeVarintPopulateSnapshotRecoveryResponse(data, uint64(r.Int63()))
|
||||
v5 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v5 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateSnapshotRecoveryResponse(data, uint64(v5))
|
||||
case 1:
|
||||
data = encodeVarintPopulateSnapshotRecoveryResponse(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -360,7 +365,7 @@ func (this *SnapshotRecoveryResponse) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings13.Join([]string{`&protobuf.SnapshotRecoveryResponse{` + `Term:` + valueToGoStringSnapshotRecoveryResponse(this.Term, "uint64"), `Success:` + valueToGoStringSnapshotRecoveryResponse(this.Success, "bool"), `CommitIndex:` + valueToGoStringSnapshotRecoveryResponse(this.CommitIndex, "uint64"), `XXX_unrecognized:` + fmt19.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings13.Join([]string{`&protobuf.SnapshotRecoveryResponse{` + `Term:` + valueToGoStringSnapshotRecoveryResponse(this.Term, "uint64"), `Success:` + valueToGoStringSnapshotRecoveryResponse(this.Success, "bool"), `CommitIndex:` + valueToGoStringSnapshotRecoveryResponse(this.CommitIndex, "uint64"), `XXX_unrecognized:` + fmt26.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringSnapshotRecoveryResponse(v interface{}, typ string) string {
|
||||
|
@ -369,7 +374,7 @@ func valueToGoStringSnapshotRecoveryResponse(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect13.Indirect(rv).Interface()
|
||||
return fmt19.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt26.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringSnapshotRecoveryResponse(e map[int32]code_google_com_p_gogoprotobuf_proto13.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -393,50 +398,50 @@ func (this *SnapshotRecoveryResponse) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt20.Errorf("that == nil && this != nil")
|
||||
return fmt27.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*SnapshotRecoveryResponse)
|
||||
if !ok {
|
||||
return fmt20.Errorf("that is not of type *SnapshotRecoveryResponse")
|
||||
return fmt27.Errorf("that is not of type *SnapshotRecoveryResponse")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt20.Errorf("that is type *SnapshotRecoveryResponse but is nil && this != nil")
|
||||
return fmt27.Errorf("that is type *SnapshotRecoveryResponse but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt20.Errorf("that is type *SnapshotRecoveryResponsebut is not nil && this == nil")
|
||||
return fmt27.Errorf("that is type *SnapshotRecoveryResponsebut is not nil && this == nil")
|
||||
}
|
||||
if this.Term != nil && that1.Term != nil {
|
||||
if *this.Term != *that1.Term {
|
||||
return fmt20.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
return fmt27.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
|
||||
}
|
||||
} else if this.Term != nil {
|
||||
return fmt20.Errorf("this.Term == nil && that.Term != nil")
|
||||
return fmt27.Errorf("this.Term == nil && that.Term != nil")
|
||||
} else if that1.Term != nil {
|
||||
return fmt20.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
return fmt27.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
|
||||
}
|
||||
if this.Success != nil && that1.Success != nil {
|
||||
if *this.Success != *that1.Success {
|
||||
return fmt20.Errorf("Success this(%v) Not Equal that(%v)", *this.Success, *that1.Success)
|
||||
return fmt27.Errorf("Success this(%v) Not Equal that(%v)", *this.Success, *that1.Success)
|
||||
}
|
||||
} else if this.Success != nil {
|
||||
return fmt20.Errorf("this.Success == nil && that.Success != nil")
|
||||
return fmt27.Errorf("this.Success == nil && that.Success != nil")
|
||||
} else if that1.Success != nil {
|
||||
return fmt20.Errorf("Success this(%v) Not Equal that(%v)", this.Success, that1.Success)
|
||||
return fmt27.Errorf("Success this(%v) Not Equal that(%v)", this.Success, that1.Success)
|
||||
}
|
||||
if this.CommitIndex != nil && that1.CommitIndex != nil {
|
||||
if *this.CommitIndex != *that1.CommitIndex {
|
||||
return fmt20.Errorf("CommitIndex this(%v) Not Equal that(%v)", *this.CommitIndex, *that1.CommitIndex)
|
||||
return fmt27.Errorf("CommitIndex this(%v) Not Equal that(%v)", *this.CommitIndex, *that1.CommitIndex)
|
||||
}
|
||||
} else if this.CommitIndex != nil {
|
||||
return fmt20.Errorf("this.CommitIndex == nil && that.CommitIndex != nil")
|
||||
return fmt27.Errorf("this.CommitIndex == nil && that.CommitIndex != nil")
|
||||
} else if that1.CommitIndex != nil {
|
||||
return fmt20.Errorf("CommitIndex this(%v) Not Equal that(%v)", this.CommitIndex, that1.CommitIndex)
|
||||
return fmt27.Errorf("CommitIndex this(%v) Not Equal that(%v)", this.CommitIndex, that1.CommitIndex)
|
||||
}
|
||||
if !bytes6.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt20.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt27.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io7 "io"
|
||||
import fmt28 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto14 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt21 "fmt"
|
||||
import fmt29 "fmt"
|
||||
import strings14 "strings"
|
||||
import reflect14 "reflect"
|
||||
|
||||
import fmt22 "fmt"
|
||||
import fmt30 "fmt"
|
||||
import strings15 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto15 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort7 "sort"
|
||||
import strconv7 "strconv"
|
||||
import reflect15 "reflect"
|
||||
|
||||
import fmt23 "fmt"
|
||||
import fmt31 "fmt"
|
||||
import bytes7 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type SnapshotRequest struct {
|
||||
|
@ -86,7 +85,7 @@ func (m *SnapshotRequest) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return proto.ErrWrongType
|
||||
return fmt28.Errorf("proto: wrong wireType = %d for field LeaderName", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -109,7 +108,7 @@ func (m *SnapshotRequest) Unmarshal(data []byte) error {
|
|||
index = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt28.Errorf("proto: wrong wireType = %d for field LastIndex", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -126,7 +125,7 @@ func (m *SnapshotRequest) Unmarshal(data []byte) error {
|
|||
m.LastIndex = &v
|
||||
case 3:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt28.Errorf("proto: wrong wireType = %d for field LastTerm", wireType)
|
||||
}
|
||||
var v uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -155,6 +154,9 @@ func (m *SnapshotRequest) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io7.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -169,7 +171,7 @@ func (this *SnapshotRequest) String() string {
|
|||
`LeaderName:` + valueToStringSnapshotRequest(this.LeaderName) + `,`,
|
||||
`LastIndex:` + valueToStringSnapshotRequest(this.LastIndex) + `,`,
|
||||
`LastTerm:` + valueToStringSnapshotRequest(this.LastTerm) + `,`,
|
||||
`XXX_unrecognized:` + fmt21.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt29.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -180,7 +182,7 @@ func valueToStringSnapshotRequest(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect14.Indirect(rv).Interface()
|
||||
return fmt21.Sprintf("*%v", pv)
|
||||
return fmt29.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *SnapshotRequest) Size() (n int) {
|
||||
var l int
|
||||
|
@ -213,7 +215,6 @@ func sovSnapshotRequest(x uint64) (n int) {
|
|||
}
|
||||
func sozSnapshotRequest(x uint64) (n int) {
|
||||
return sovSnapshotRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovSnapshotRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedSnapshotRequest(r randySnapshotRequest, easy bool) *SnapshotRequest {
|
||||
this := &SnapshotRequest{}
|
||||
|
@ -270,7 +271,11 @@ func randFieldSnapshotRequest(data []byte, r randySnapshotRequest, fieldNumber i
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateSnapshotRequest(data, uint64(key))
|
||||
data = encodeVarintPopulateSnapshotRequest(data, uint64(r.Int63()))
|
||||
v5 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v5 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateSnapshotRequest(data, uint64(v5))
|
||||
case 1:
|
||||
data = encodeVarintPopulateSnapshotRequest(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -362,7 +367,7 @@ func (this *SnapshotRequest) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings15.Join([]string{`&protobuf.SnapshotRequest{` + `LeaderName:` + valueToGoStringSnapshotRequest(this.LeaderName, "string"), `LastIndex:` + valueToGoStringSnapshotRequest(this.LastIndex, "uint64"), `LastTerm:` + valueToGoStringSnapshotRequest(this.LastTerm, "uint64"), `XXX_unrecognized:` + fmt22.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings15.Join([]string{`&protobuf.SnapshotRequest{` + `LeaderName:` + valueToGoStringSnapshotRequest(this.LeaderName, "string"), `LastIndex:` + valueToGoStringSnapshotRequest(this.LastIndex, "uint64"), `LastTerm:` + valueToGoStringSnapshotRequest(this.LastTerm, "uint64"), `XXX_unrecognized:` + fmt30.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringSnapshotRequest(v interface{}, typ string) string {
|
||||
|
@ -371,7 +376,7 @@ func valueToGoStringSnapshotRequest(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect15.Indirect(rv).Interface()
|
||||
return fmt22.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt30.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringSnapshotRequest(e map[int32]code_google_com_p_gogoprotobuf_proto15.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -395,50 +400,50 @@ func (this *SnapshotRequest) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt23.Errorf("that == nil && this != nil")
|
||||
return fmt31.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*SnapshotRequest)
|
||||
if !ok {
|
||||
return fmt23.Errorf("that is not of type *SnapshotRequest")
|
||||
return fmt31.Errorf("that is not of type *SnapshotRequest")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt23.Errorf("that is type *SnapshotRequest but is nil && this != nil")
|
||||
return fmt31.Errorf("that is type *SnapshotRequest but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt23.Errorf("that is type *SnapshotRequestbut is not nil && this == nil")
|
||||
return fmt31.Errorf("that is type *SnapshotRequestbut is not nil && this == nil")
|
||||
}
|
||||
if this.LeaderName != nil && that1.LeaderName != nil {
|
||||
if *this.LeaderName != *that1.LeaderName {
|
||||
return fmt23.Errorf("LeaderName this(%v) Not Equal that(%v)", *this.LeaderName, *that1.LeaderName)
|
||||
return fmt31.Errorf("LeaderName this(%v) Not Equal that(%v)", *this.LeaderName, *that1.LeaderName)
|
||||
}
|
||||
} else if this.LeaderName != nil {
|
||||
return fmt23.Errorf("this.LeaderName == nil && that.LeaderName != nil")
|
||||
return fmt31.Errorf("this.LeaderName == nil && that.LeaderName != nil")
|
||||
} else if that1.LeaderName != nil {
|
||||
return fmt23.Errorf("LeaderName this(%v) Not Equal that(%v)", this.LeaderName, that1.LeaderName)
|
||||
return fmt31.Errorf("LeaderName this(%v) Not Equal that(%v)", this.LeaderName, that1.LeaderName)
|
||||
}
|
||||
if this.LastIndex != nil && that1.LastIndex != nil {
|
||||
if *this.LastIndex != *that1.LastIndex {
|
||||
return fmt23.Errorf("LastIndex this(%v) Not Equal that(%v)", *this.LastIndex, *that1.LastIndex)
|
||||
return fmt31.Errorf("LastIndex this(%v) Not Equal that(%v)", *this.LastIndex, *that1.LastIndex)
|
||||
}
|
||||
} else if this.LastIndex != nil {
|
||||
return fmt23.Errorf("this.LastIndex == nil && that.LastIndex != nil")
|
||||
return fmt31.Errorf("this.LastIndex == nil && that.LastIndex != nil")
|
||||
} else if that1.LastIndex != nil {
|
||||
return fmt23.Errorf("LastIndex this(%v) Not Equal that(%v)", this.LastIndex, that1.LastIndex)
|
||||
return fmt31.Errorf("LastIndex this(%v) Not Equal that(%v)", this.LastIndex, that1.LastIndex)
|
||||
}
|
||||
if this.LastTerm != nil && that1.LastTerm != nil {
|
||||
if *this.LastTerm != *that1.LastTerm {
|
||||
return fmt23.Errorf("LastTerm this(%v) Not Equal that(%v)", *this.LastTerm, *that1.LastTerm)
|
||||
return fmt31.Errorf("LastTerm this(%v) Not Equal that(%v)", *this.LastTerm, *that1.LastTerm)
|
||||
}
|
||||
} else if this.LastTerm != nil {
|
||||
return fmt23.Errorf("this.LastTerm == nil && that.LastTerm != nil")
|
||||
return fmt31.Errorf("this.LastTerm == nil && that.LastTerm != nil")
|
||||
} else if that1.LastTerm != nil {
|
||||
return fmt23.Errorf("LastTerm this(%v) Not Equal that(%v)", this.LastTerm, that1.LastTerm)
|
||||
return fmt31.Errorf("LastTerm this(%v) Not Equal that(%v)", this.LastTerm, that1.LastTerm)
|
||||
}
|
||||
if !bytes7.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt23.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt31.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,31 +5,30 @@
|
|||
package protobuf
|
||||
|
||||
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.pb"
|
||||
|
||||
import io8 "io"
|
||||
import fmt32 "fmt"
|
||||
import code_google_com_p_gogoprotobuf_proto16 "code.google.com/p/gogoprotobuf/proto"
|
||||
|
||||
import fmt24 "fmt"
|
||||
import fmt33 "fmt"
|
||||
import strings16 "strings"
|
||||
import reflect16 "reflect"
|
||||
|
||||
import fmt25 "fmt"
|
||||
import fmt34 "fmt"
|
||||
import strings17 "strings"
|
||||
import code_google_com_p_gogoprotobuf_proto17 "code.google.com/p/gogoprotobuf/proto"
|
||||
import sort8 "sort"
|
||||
import strconv8 "strconv"
|
||||
import reflect17 "reflect"
|
||||
|
||||
import fmt26 "fmt"
|
||||
import fmt35 "fmt"
|
||||
import bytes8 "bytes"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type SnapshotResponse struct {
|
||||
|
@ -70,7 +69,7 @@ func (m *SnapshotResponse) Unmarshal(data []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return proto.ErrWrongType
|
||||
return fmt32.Errorf("proto: wrong wireType = %d for field Success", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -100,6 +99,9 @@ func (m *SnapshotResponse) Unmarshal(data []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (index + skippy) > l {
|
||||
return io8.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
|
||||
index += skippy
|
||||
}
|
||||
|
@ -112,7 +114,7 @@ func (this *SnapshotResponse) String() string {
|
|||
}
|
||||
s := strings16.Join([]string{`&SnapshotResponse{`,
|
||||
`Success:` + valueToStringSnapshotResponse(this.Success) + `,`,
|
||||
`XXX_unrecognized:` + fmt24.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`XXX_unrecognized:` + fmt33.Sprintf("%v", this.XXX_unrecognized) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -123,7 +125,7 @@ func valueToStringSnapshotResponse(v interface{}) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect16.Indirect(rv).Interface()
|
||||
return fmt24.Sprintf("*%v", pv)
|
||||
return fmt33.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *SnapshotResponse) Size() (n int) {
|
||||
var l int
|
||||
|
@ -149,7 +151,6 @@ func sovSnapshotResponse(x uint64) (n int) {
|
|||
}
|
||||
func sozSnapshotResponse(x uint64) (n int) {
|
||||
return sovSnapshotResponse(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
return sovSnapshotResponse(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func NewPopulatedSnapshotResponse(r randySnapshotResponse, easy bool) *SnapshotResponse {
|
||||
this := &SnapshotResponse{}
|
||||
|
@ -202,7 +203,11 @@ func randFieldSnapshotResponse(data []byte, r randySnapshotResponse, fieldNumber
|
|||
switch wire {
|
||||
case 0:
|
||||
data = encodeVarintPopulateSnapshotResponse(data, uint64(key))
|
||||
data = encodeVarintPopulateSnapshotResponse(data, uint64(r.Int63()))
|
||||
v3 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v3 *= -1
|
||||
}
|
||||
data = encodeVarintPopulateSnapshotResponse(data, uint64(v3))
|
||||
case 1:
|
||||
data = encodeVarintPopulateSnapshotResponse(data, uint64(key))
|
||||
data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
||||
|
@ -288,7 +293,7 @@ func (this *SnapshotResponse) GoString() string {
|
|||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings17.Join([]string{`&protobuf.SnapshotResponse{` + `Success:` + valueToGoStringSnapshotResponse(this.Success, "bool"), `XXX_unrecognized:` + fmt25.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
s := strings17.Join([]string{`&protobuf.SnapshotResponse{` + `Success:` + valueToGoStringSnapshotResponse(this.Success, "bool"), `XXX_unrecognized:` + fmt34.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
|
||||
return s
|
||||
}
|
||||
func valueToGoStringSnapshotResponse(v interface{}, typ string) string {
|
||||
|
@ -297,7 +302,7 @@ func valueToGoStringSnapshotResponse(v interface{}, typ string) string {
|
|||
return "nil"
|
||||
}
|
||||
pv := reflect17.Indirect(rv).Interface()
|
||||
return fmt25.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
return fmt34.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringSnapshotResponse(e map[int32]code_google_com_p_gogoprotobuf_proto17.Extension) string {
|
||||
if e == nil {
|
||||
|
@ -321,32 +326,32 @@ func (this *SnapshotResponse) VerboseEqual(that interface{}) error {
|
|||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt26.Errorf("that == nil && this != nil")
|
||||
return fmt35.Errorf("that == nil && this != nil")
|
||||
}
|
||||
|
||||
that1, ok := that.(*SnapshotResponse)
|
||||
if !ok {
|
||||
return fmt26.Errorf("that is not of type *SnapshotResponse")
|
||||
return fmt35.Errorf("that is not of type *SnapshotResponse")
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return nil
|
||||
}
|
||||
return fmt26.Errorf("that is type *SnapshotResponse but is nil && this != nil")
|
||||
return fmt35.Errorf("that is type *SnapshotResponse but is nil && this != nil")
|
||||
} else if this == nil {
|
||||
return fmt26.Errorf("that is type *SnapshotResponsebut is not nil && this == nil")
|
||||
return fmt35.Errorf("that is type *SnapshotResponsebut is not nil && this == nil")
|
||||
}
|
||||
if this.Success != nil && that1.Success != nil {
|
||||
if *this.Success != *that1.Success {
|
||||
return fmt26.Errorf("Success this(%v) Not Equal that(%v)", *this.Success, *that1.Success)
|
||||
return fmt35.Errorf("Success this(%v) Not Equal that(%v)", *this.Success, *that1.Success)
|
||||
}
|
||||
} else if this.Success != nil {
|
||||
return fmt26.Errorf("this.Success == nil && that.Success != nil")
|
||||
return fmt35.Errorf("this.Success == nil && that.Success != nil")
|
||||
} else if that1.Success != nil {
|
||||
return fmt26.Errorf("Success this(%v) Not Equal that(%v)", this.Success, that1.Success)
|
||||
return fmt35.Errorf("Success this(%v) Not Equal that(%v)", this.Success, that1.Success)
|
||||
}
|
||||
if !bytes8.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return fmt26.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
return fmt35.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ func (s *RaftServer) startRaft() error {
|
|||
log.Info("Initializing Raft Server: %s", s.config.RaftConnectionString())
|
||||
|
||||
// Initialize and start Raft server.
|
||||
transporter := raft.NewHTTPTransporter("/raft")
|
||||
transporter := raft.NewHTTPTransporter("/raft", raft.DefaultElectionTimeout)
|
||||
var err error
|
||||
s.raftServer, err = raft.NewServer(s.name, s.path, transporter, s.clusterConfig, s.clusterConfig, "")
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue