append_entries_request.pb.go 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. // Code generated by protoc-gen-go.
  2. // source: append_entries_request.proto
  3. // DO NOT EDIT!
  4. package protobuf
  5. import proto "code.google.com/p/goprotobuf/proto"
  6. import json "encoding/json"
  7. import math "math"
  8. // Reference proto, json, and math imports to suppress error if they are not otherwise used.
  9. var _ = proto.Marshal
  10. var _ = &json.SyntaxError{}
  11. var _ = math.Inf
  12. type ProtoAppendEntriesRequest struct {
  13. Term *uint64 `protobuf:"varint,1,req" json:"Term,omitempty"`
  14. PrevLogIndex *uint64 `protobuf:"varint,2,req" json:"PrevLogIndex,omitempty"`
  15. PrevLogTerm *uint64 `protobuf:"varint,3,req" json:"PrevLogTerm,omitempty"`
  16. CommitIndex *uint64 `protobuf:"varint,4,req" json:"CommitIndex,omitempty"`
  17. LeaderName *string `protobuf:"bytes,5,req" json:"LeaderName,omitempty"`
  18. Entries []*ProtoAppendEntriesRequest_ProtoLogEntry `protobuf:"bytes,6,rep" json:"Entries,omitempty"`
  19. XXX_unrecognized []byte `json:"-"`
  20. }
  21. func (m *ProtoAppendEntriesRequest) Reset() { *m = ProtoAppendEntriesRequest{} }
  22. func (m *ProtoAppendEntriesRequest) String() string { return proto.CompactTextString(m) }
  23. func (*ProtoAppendEntriesRequest) ProtoMessage() {}
  24. func (m *ProtoAppendEntriesRequest) GetTerm() uint64 {
  25. if m != nil && m.Term != nil {
  26. return *m.Term
  27. }
  28. return 0
  29. }
  30. func (m *ProtoAppendEntriesRequest) GetPrevLogIndex() uint64 {
  31. if m != nil && m.PrevLogIndex != nil {
  32. return *m.PrevLogIndex
  33. }
  34. return 0
  35. }
  36. func (m *ProtoAppendEntriesRequest) GetPrevLogTerm() uint64 {
  37. if m != nil && m.PrevLogTerm != nil {
  38. return *m.PrevLogTerm
  39. }
  40. return 0
  41. }
  42. func (m *ProtoAppendEntriesRequest) GetCommitIndex() uint64 {
  43. if m != nil && m.CommitIndex != nil {
  44. return *m.CommitIndex
  45. }
  46. return 0
  47. }
  48. func (m *ProtoAppendEntriesRequest) GetLeaderName() string {
  49. if m != nil && m.LeaderName != nil {
  50. return *m.LeaderName
  51. }
  52. return ""
  53. }
  54. func (m *ProtoAppendEntriesRequest) GetEntries() []*ProtoAppendEntriesRequest_ProtoLogEntry {
  55. if m != nil {
  56. return m.Entries
  57. }
  58. return nil
  59. }
  60. type ProtoAppendEntriesRequest_ProtoLogEntry struct {
  61. Index *uint64 `protobuf:"varint,1,req" json:"Index,omitempty"`
  62. Term *uint64 `protobuf:"varint,2,req" json:"Term,omitempty"`
  63. CommandName *string `protobuf:"bytes,3,req" json:"CommandName,omitempty"`
  64. Command []byte `protobuf:"bytes,4,opt" json:"Command,omitempty"`
  65. XXX_unrecognized []byte `json:"-"`
  66. }
  67. func (m *ProtoAppendEntriesRequest_ProtoLogEntry) Reset() {
  68. *m = ProtoAppendEntriesRequest_ProtoLogEntry{}
  69. }
  70. func (m *ProtoAppendEntriesRequest_ProtoLogEntry) String() string { return proto.CompactTextString(m) }
  71. func (*ProtoAppendEntriesRequest_ProtoLogEntry) ProtoMessage() {}
  72. func (m *ProtoAppendEntriesRequest_ProtoLogEntry) GetIndex() uint64 {
  73. if m != nil && m.Index != nil {
  74. return *m.Index
  75. }
  76. return 0
  77. }
  78. func (m *ProtoAppendEntriesRequest_ProtoLogEntry) GetTerm() uint64 {
  79. if m != nil && m.Term != nil {
  80. return *m.Term
  81. }
  82. return 0
  83. }
  84. func (m *ProtoAppendEntriesRequest_ProtoLogEntry) GetCommandName() string {
  85. if m != nil && m.CommandName != nil {
  86. return *m.CommandName
  87. }
  88. return ""
  89. }
  90. func (m *ProtoAppendEntriesRequest_ProtoLogEntry) GetCommand() []byte {
  91. if m != nil {
  92. return m.Command
  93. }
  94. return nil
  95. }
  96. func init() {
  97. }