etcdserver.pb.go 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: etcdserver.proto
  3. package etcdserverpb
  4. import (
  5. fmt "fmt"
  6. io "io"
  7. math "math"
  8. math_bits "math/bits"
  9. _ "github.com/gogo/protobuf/gogoproto"
  10. proto "github.com/golang/protobuf/proto"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  21. type Request struct {
  22. ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"`
  23. Method string `protobuf:"bytes,2,opt,name=Method" json:"Method"`
  24. Path string `protobuf:"bytes,3,opt,name=Path" json:"Path"`
  25. Val string `protobuf:"bytes,4,opt,name=Val" json:"Val"`
  26. Dir bool `protobuf:"varint,5,opt,name=Dir" json:"Dir"`
  27. PrevValue string `protobuf:"bytes,6,opt,name=PrevValue" json:"PrevValue"`
  28. PrevIndex uint64 `protobuf:"varint,7,opt,name=PrevIndex" json:"PrevIndex"`
  29. PrevExist *bool `protobuf:"varint,8,opt,name=PrevExist" json:"PrevExist,omitempty"`
  30. Expiration int64 `protobuf:"varint,9,opt,name=Expiration" json:"Expiration"`
  31. Wait bool `protobuf:"varint,10,opt,name=Wait" json:"Wait"`
  32. Since uint64 `protobuf:"varint,11,opt,name=Since" json:"Since"`
  33. Recursive bool `protobuf:"varint,12,opt,name=Recursive" json:"Recursive"`
  34. Sorted bool `protobuf:"varint,13,opt,name=Sorted" json:"Sorted"`
  35. Quorum bool `protobuf:"varint,14,opt,name=Quorum" json:"Quorum"`
  36. Time int64 `protobuf:"varint,15,opt,name=Time" json:"Time"`
  37. Stream bool `protobuf:"varint,16,opt,name=Stream" json:"Stream"`
  38. Refresh *bool `protobuf:"varint,17,opt,name=Refresh" json:"Refresh,omitempty"`
  39. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  40. XXX_unrecognized []byte `json:"-"`
  41. XXX_sizecache int32 `json:"-"`
  42. }
  43. func (m *Request) Reset() { *m = Request{} }
  44. func (m *Request) String() string { return proto.CompactTextString(m) }
  45. func (*Request) ProtoMessage() {}
  46. func (*Request) Descriptor() ([]byte, []int) {
  47. return fileDescriptor_09ffbeb3bebbce7e, []int{0}
  48. }
  49. func (m *Request) XXX_Unmarshal(b []byte) error {
  50. return m.Unmarshal(b)
  51. }
  52. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  53. if deterministic {
  54. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  55. } else {
  56. b = b[:cap(b)]
  57. n, err := m.MarshalToSizedBuffer(b)
  58. if err != nil {
  59. return nil, err
  60. }
  61. return b[:n], nil
  62. }
  63. }
  64. func (m *Request) XXX_Merge(src proto.Message) {
  65. xxx_messageInfo_Request.Merge(m, src)
  66. }
  67. func (m *Request) XXX_Size() int {
  68. return m.Size()
  69. }
  70. func (m *Request) XXX_DiscardUnknown() {
  71. xxx_messageInfo_Request.DiscardUnknown(m)
  72. }
  73. var xxx_messageInfo_Request proto.InternalMessageInfo
  74. type Metadata struct {
  75. NodeID uint64 `protobuf:"varint,1,opt,name=NodeID" json:"NodeID"`
  76. ClusterID uint64 `protobuf:"varint,2,opt,name=ClusterID" json:"ClusterID"`
  77. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  78. XXX_unrecognized []byte `json:"-"`
  79. XXX_sizecache int32 `json:"-"`
  80. }
  81. func (m *Metadata) Reset() { *m = Metadata{} }
  82. func (m *Metadata) String() string { return proto.CompactTextString(m) }
  83. func (*Metadata) ProtoMessage() {}
  84. func (*Metadata) Descriptor() ([]byte, []int) {
  85. return fileDescriptor_09ffbeb3bebbce7e, []int{1}
  86. }
  87. func (m *Metadata) XXX_Unmarshal(b []byte) error {
  88. return m.Unmarshal(b)
  89. }
  90. func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  91. if deterministic {
  92. return xxx_messageInfo_Metadata.Marshal(b, m, deterministic)
  93. } else {
  94. b = b[:cap(b)]
  95. n, err := m.MarshalToSizedBuffer(b)
  96. if err != nil {
  97. return nil, err
  98. }
  99. return b[:n], nil
  100. }
  101. }
  102. func (m *Metadata) XXX_Merge(src proto.Message) {
  103. xxx_messageInfo_Metadata.Merge(m, src)
  104. }
  105. func (m *Metadata) XXX_Size() int {
  106. return m.Size()
  107. }
  108. func (m *Metadata) XXX_DiscardUnknown() {
  109. xxx_messageInfo_Metadata.DiscardUnknown(m)
  110. }
  111. var xxx_messageInfo_Metadata proto.InternalMessageInfo
  112. func init() {
  113. proto.RegisterType((*Request)(nil), "etcdserverpb.Request")
  114. proto.RegisterType((*Metadata)(nil), "etcdserverpb.Metadata")
  115. }
  116. func init() { proto.RegisterFile("etcdserver.proto", fileDescriptor_09ffbeb3bebbce7e) }
  117. var fileDescriptor_09ffbeb3bebbce7e = []byte{
  118. // 380 bytes of a gzipped FileDescriptorProto
  119. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd2, 0xdd, 0x6e, 0xda, 0x30,
  120. 0x14, 0x07, 0x70, 0x0c, 0xe1, 0xcb, 0x63, 0x1b, 0xb3, 0xd0, 0x74, 0x84, 0xa6, 0x2c, 0x42, 0xbb,
  121. 0xc8, 0xd5, 0xf6, 0x0e, 0x2c, 0x5c, 0x44, 0x2a, 0x15, 0x0d, 0x15, 0xbd, 0x76, 0xc9, 0x29, 0x58,
  122. 0x02, 0x4c, 0x1d, 0x07, 0xf1, 0x06, 0x7d, 0x85, 0x3e, 0x12, 0x97, 0x7d, 0x82, 0xaa, 0xa5, 0x2f,
  123. 0x52, 0x39, 0x24, 0xc4, 0xed, 0x5d, 0xf4, 0xfb, 0x9f, 0x1c, 0x1f, 0x7f, 0xd0, 0x2e, 0xea, 0x79,
  124. 0x9c, 0xa0, 0xda, 0xa1, 0xfa, 0xbb, 0x55, 0x52, 0x4b, 0xd6, 0x29, 0x65, 0x7b, 0xdb, 0xef, 0x2d,
  125. 0xe4, 0x42, 0x66, 0xc1, 0x3f, 0xf3, 0x75, 0xaa, 0x19, 0x3c, 0x38, 0xb4, 0x19, 0xe1, 0x7d, 0x8a,
  126. 0x89, 0x66, 0x3d, 0x5a, 0x0d, 0x03, 0x20, 0x1e, 0xf1, 0x9d, 0xa1, 0x73, 0x78, 0xfe, 0x5d, 0x89,
  127. 0xaa, 0x61, 0xc0, 0x7e, 0xd1, 0xc6, 0x18, 0xf5, 0x52, 0xc6, 0x50, 0xf5, 0x88, 0xdf, 0xce, 0x93,
  128. 0xdc, 0x18, 0x50, 0x67, 0xc2, 0xf5, 0x12, 0x6a, 0x56, 0x96, 0x09, 0xfb, 0x49, 0x6b, 0x33, 0xbe,
  129. 0x02, 0xc7, 0x0a, 0x0c, 0x18, 0x0f, 0x84, 0x82, 0xba, 0x47, 0xfc, 0x56, 0xe1, 0x81, 0x50, 0x6c,
  130. 0x40, 0xdb, 0x13, 0x85, 0xbb, 0x19, 0x5f, 0xa5, 0x08, 0x0d, 0xeb, 0xaf, 0x92, 0x8b, 0x9a, 0x70,
  131. 0x13, 0xe3, 0x1e, 0x9a, 0xd6, 0xa0, 0x25, 0x17, 0x35, 0xa3, 0xbd, 0x48, 0x34, 0xb4, 0xce, 0xab,
  132. 0x90, 0xa8, 0x64, 0xf6, 0x87, 0xd2, 0xd1, 0x7e, 0x2b, 0x14, 0xd7, 0x42, 0x6e, 0xa0, 0xed, 0x11,
  133. 0xbf, 0x96, 0x37, 0xb2, 0xdc, 0xec, 0xed, 0x86, 0x0b, 0x0d, 0xd4, 0x1a, 0x35, 0x13, 0xd6, 0xa7,
  134. 0xf5, 0xa9, 0xd8, 0xcc, 0x11, 0xbe, 0x58, 0x33, 0x9c, 0xc8, 0xac, 0x1f, 0xe1, 0x3c, 0x55, 0x89,
  135. 0xd8, 0x21, 0x74, 0xac, 0x5f, 0x4b, 0x36, 0x67, 0x3a, 0x95, 0x4a, 0x63, 0x0c, 0x5f, 0xad, 0x82,
  136. 0xdc, 0x4c, 0x7a, 0x95, 0x4a, 0x95, 0xae, 0xe1, 0x9b, 0x9d, 0x9e, 0xcc, 0x4c, 0x75, 0x2d, 0xd6,
  137. 0x08, 0xdf, 0xad, 0xa9, 0x33, 0xc9, 0xba, 0x6a, 0x85, 0x7c, 0x0d, 0xdd, 0x0f, 0x5d, 0x33, 0x63,
  138. 0xae, 0xb9, 0xe8, 0x3b, 0x85, 0xc9, 0x12, 0x7e, 0x58, 0xa7, 0x52, 0xe0, 0xe0, 0x82, 0xb6, 0xc6,
  139. 0xa8, 0x79, 0xcc, 0x35, 0x37, 0x9d, 0x2e, 0x65, 0x8c, 0x9f, 0x5e, 0x43, 0x6e, 0x66, 0x87, 0xff,
  140. 0x57, 0x69, 0xa2, 0x51, 0x85, 0x41, 0xf6, 0x28, 0xce, 0xb7, 0x70, 0xe6, 0x61, 0xef, 0xf0, 0xea,
  141. 0x56, 0x0e, 0x47, 0x97, 0x3c, 0x1d, 0x5d, 0xf2, 0x72, 0x74, 0xc9, 0xe3, 0x9b, 0x5b, 0x79, 0x0f,
  142. 0x00, 0x00, 0xff, 0xff, 0xee, 0x40, 0xba, 0xd6, 0xa4, 0x02, 0x00, 0x00,
  143. }
  144. func (m *Request) Marshal() (dAtA []byte, err error) {
  145. size := m.Size()
  146. dAtA = make([]byte, size)
  147. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  148. if err != nil {
  149. return nil, err
  150. }
  151. return dAtA[:n], nil
  152. }
  153. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  154. size := m.Size()
  155. return m.MarshalToSizedBuffer(dAtA[:size])
  156. }
  157. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  158. i := len(dAtA)
  159. _ = i
  160. var l int
  161. _ = l
  162. if m.XXX_unrecognized != nil {
  163. i -= len(m.XXX_unrecognized)
  164. copy(dAtA[i:], m.XXX_unrecognized)
  165. }
  166. if m.Refresh != nil {
  167. i--
  168. if *m.Refresh {
  169. dAtA[i] = 1
  170. } else {
  171. dAtA[i] = 0
  172. }
  173. i--
  174. dAtA[i] = 0x1
  175. i--
  176. dAtA[i] = 0x88
  177. }
  178. i--
  179. if m.Stream {
  180. dAtA[i] = 1
  181. } else {
  182. dAtA[i] = 0
  183. }
  184. i--
  185. dAtA[i] = 0x1
  186. i--
  187. dAtA[i] = 0x80
  188. i = encodeVarintEtcdserver(dAtA, i, uint64(m.Time))
  189. i--
  190. dAtA[i] = 0x78
  191. i--
  192. if m.Quorum {
  193. dAtA[i] = 1
  194. } else {
  195. dAtA[i] = 0
  196. }
  197. i--
  198. dAtA[i] = 0x70
  199. i--
  200. if m.Sorted {
  201. dAtA[i] = 1
  202. } else {
  203. dAtA[i] = 0
  204. }
  205. i--
  206. dAtA[i] = 0x68
  207. i--
  208. if m.Recursive {
  209. dAtA[i] = 1
  210. } else {
  211. dAtA[i] = 0
  212. }
  213. i--
  214. dAtA[i] = 0x60
  215. i = encodeVarintEtcdserver(dAtA, i, uint64(m.Since))
  216. i--
  217. dAtA[i] = 0x58
  218. i--
  219. if m.Wait {
  220. dAtA[i] = 1
  221. } else {
  222. dAtA[i] = 0
  223. }
  224. i--
  225. dAtA[i] = 0x50
  226. i = encodeVarintEtcdserver(dAtA, i, uint64(m.Expiration))
  227. i--
  228. dAtA[i] = 0x48
  229. if m.PrevExist != nil {
  230. i--
  231. if *m.PrevExist {
  232. dAtA[i] = 1
  233. } else {
  234. dAtA[i] = 0
  235. }
  236. i--
  237. dAtA[i] = 0x40
  238. }
  239. i = encodeVarintEtcdserver(dAtA, i, uint64(m.PrevIndex))
  240. i--
  241. dAtA[i] = 0x38
  242. i -= len(m.PrevValue)
  243. copy(dAtA[i:], m.PrevValue)
  244. i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.PrevValue)))
  245. i--
  246. dAtA[i] = 0x32
  247. i--
  248. if m.Dir {
  249. dAtA[i] = 1
  250. } else {
  251. dAtA[i] = 0
  252. }
  253. i--
  254. dAtA[i] = 0x28
  255. i -= len(m.Val)
  256. copy(dAtA[i:], m.Val)
  257. i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Val)))
  258. i--
  259. dAtA[i] = 0x22
  260. i -= len(m.Path)
  261. copy(dAtA[i:], m.Path)
  262. i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Path)))
  263. i--
  264. dAtA[i] = 0x1a
  265. i -= len(m.Method)
  266. copy(dAtA[i:], m.Method)
  267. i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Method)))
  268. i--
  269. dAtA[i] = 0x12
  270. i = encodeVarintEtcdserver(dAtA, i, uint64(m.ID))
  271. i--
  272. dAtA[i] = 0x8
  273. return len(dAtA) - i, nil
  274. }
  275. func (m *Metadata) Marshal() (dAtA []byte, err error) {
  276. size := m.Size()
  277. dAtA = make([]byte, size)
  278. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  279. if err != nil {
  280. return nil, err
  281. }
  282. return dAtA[:n], nil
  283. }
  284. func (m *Metadata) MarshalTo(dAtA []byte) (int, error) {
  285. size := m.Size()
  286. return m.MarshalToSizedBuffer(dAtA[:size])
  287. }
  288. func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  289. i := len(dAtA)
  290. _ = i
  291. var l int
  292. _ = l
  293. if m.XXX_unrecognized != nil {
  294. i -= len(m.XXX_unrecognized)
  295. copy(dAtA[i:], m.XXX_unrecognized)
  296. }
  297. i = encodeVarintEtcdserver(dAtA, i, uint64(m.ClusterID))
  298. i--
  299. dAtA[i] = 0x10
  300. i = encodeVarintEtcdserver(dAtA, i, uint64(m.NodeID))
  301. i--
  302. dAtA[i] = 0x8
  303. return len(dAtA) - i, nil
  304. }
  305. func encodeVarintEtcdserver(dAtA []byte, offset int, v uint64) int {
  306. offset -= sovEtcdserver(v)
  307. base := offset
  308. for v >= 1<<7 {
  309. dAtA[offset] = uint8(v&0x7f | 0x80)
  310. v >>= 7
  311. offset++
  312. }
  313. dAtA[offset] = uint8(v)
  314. return base
  315. }
  316. func (m *Request) Size() (n int) {
  317. if m == nil {
  318. return 0
  319. }
  320. var l int
  321. _ = l
  322. n += 1 + sovEtcdserver(uint64(m.ID))
  323. l = len(m.Method)
  324. n += 1 + l + sovEtcdserver(uint64(l))
  325. l = len(m.Path)
  326. n += 1 + l + sovEtcdserver(uint64(l))
  327. l = len(m.Val)
  328. n += 1 + l + sovEtcdserver(uint64(l))
  329. n += 2
  330. l = len(m.PrevValue)
  331. n += 1 + l + sovEtcdserver(uint64(l))
  332. n += 1 + sovEtcdserver(uint64(m.PrevIndex))
  333. if m.PrevExist != nil {
  334. n += 2
  335. }
  336. n += 1 + sovEtcdserver(uint64(m.Expiration))
  337. n += 2
  338. n += 1 + sovEtcdserver(uint64(m.Since))
  339. n += 2
  340. n += 2
  341. n += 2
  342. n += 1 + sovEtcdserver(uint64(m.Time))
  343. n += 3
  344. if m.Refresh != nil {
  345. n += 3
  346. }
  347. if m.XXX_unrecognized != nil {
  348. n += len(m.XXX_unrecognized)
  349. }
  350. return n
  351. }
  352. func (m *Metadata) Size() (n int) {
  353. if m == nil {
  354. return 0
  355. }
  356. var l int
  357. _ = l
  358. n += 1 + sovEtcdserver(uint64(m.NodeID))
  359. n += 1 + sovEtcdserver(uint64(m.ClusterID))
  360. if m.XXX_unrecognized != nil {
  361. n += len(m.XXX_unrecognized)
  362. }
  363. return n
  364. }
  365. func sovEtcdserver(x uint64) (n int) {
  366. return (math_bits.Len64(x|1) + 6) / 7
  367. }
  368. func sozEtcdserver(x uint64) (n int) {
  369. return sovEtcdserver(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  370. }
  371. func (m *Request) Unmarshal(dAtA []byte) error {
  372. l := len(dAtA)
  373. iNdEx := 0
  374. for iNdEx < l {
  375. preIndex := iNdEx
  376. var wire uint64
  377. for shift := uint(0); ; shift += 7 {
  378. if shift >= 64 {
  379. return ErrIntOverflowEtcdserver
  380. }
  381. if iNdEx >= l {
  382. return io.ErrUnexpectedEOF
  383. }
  384. b := dAtA[iNdEx]
  385. iNdEx++
  386. wire |= uint64(b&0x7F) << shift
  387. if b < 0x80 {
  388. break
  389. }
  390. }
  391. fieldNum := int32(wire >> 3)
  392. wireType := int(wire & 0x7)
  393. if wireType == 4 {
  394. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  395. }
  396. if fieldNum <= 0 {
  397. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  398. }
  399. switch fieldNum {
  400. case 1:
  401. if wireType != 0 {
  402. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  403. }
  404. m.ID = 0
  405. for shift := uint(0); ; shift += 7 {
  406. if shift >= 64 {
  407. return ErrIntOverflowEtcdserver
  408. }
  409. if iNdEx >= l {
  410. return io.ErrUnexpectedEOF
  411. }
  412. b := dAtA[iNdEx]
  413. iNdEx++
  414. m.ID |= uint64(b&0x7F) << shift
  415. if b < 0x80 {
  416. break
  417. }
  418. }
  419. case 2:
  420. if wireType != 2 {
  421. return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
  422. }
  423. var stringLen uint64
  424. for shift := uint(0); ; shift += 7 {
  425. if shift >= 64 {
  426. return ErrIntOverflowEtcdserver
  427. }
  428. if iNdEx >= l {
  429. return io.ErrUnexpectedEOF
  430. }
  431. b := dAtA[iNdEx]
  432. iNdEx++
  433. stringLen |= uint64(b&0x7F) << shift
  434. if b < 0x80 {
  435. break
  436. }
  437. }
  438. intStringLen := int(stringLen)
  439. if intStringLen < 0 {
  440. return ErrInvalidLengthEtcdserver
  441. }
  442. postIndex := iNdEx + intStringLen
  443. if postIndex < 0 {
  444. return ErrInvalidLengthEtcdserver
  445. }
  446. if postIndex > l {
  447. return io.ErrUnexpectedEOF
  448. }
  449. m.Method = string(dAtA[iNdEx:postIndex])
  450. iNdEx = postIndex
  451. case 3:
  452. if wireType != 2 {
  453. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  454. }
  455. var stringLen uint64
  456. for shift := uint(0); ; shift += 7 {
  457. if shift >= 64 {
  458. return ErrIntOverflowEtcdserver
  459. }
  460. if iNdEx >= l {
  461. return io.ErrUnexpectedEOF
  462. }
  463. b := dAtA[iNdEx]
  464. iNdEx++
  465. stringLen |= uint64(b&0x7F) << shift
  466. if b < 0x80 {
  467. break
  468. }
  469. }
  470. intStringLen := int(stringLen)
  471. if intStringLen < 0 {
  472. return ErrInvalidLengthEtcdserver
  473. }
  474. postIndex := iNdEx + intStringLen
  475. if postIndex < 0 {
  476. return ErrInvalidLengthEtcdserver
  477. }
  478. if postIndex > l {
  479. return io.ErrUnexpectedEOF
  480. }
  481. m.Path = string(dAtA[iNdEx:postIndex])
  482. iNdEx = postIndex
  483. case 4:
  484. if wireType != 2 {
  485. return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType)
  486. }
  487. var stringLen uint64
  488. for shift := uint(0); ; shift += 7 {
  489. if shift >= 64 {
  490. return ErrIntOverflowEtcdserver
  491. }
  492. if iNdEx >= l {
  493. return io.ErrUnexpectedEOF
  494. }
  495. b := dAtA[iNdEx]
  496. iNdEx++
  497. stringLen |= uint64(b&0x7F) << shift
  498. if b < 0x80 {
  499. break
  500. }
  501. }
  502. intStringLen := int(stringLen)
  503. if intStringLen < 0 {
  504. return ErrInvalidLengthEtcdserver
  505. }
  506. postIndex := iNdEx + intStringLen
  507. if postIndex < 0 {
  508. return ErrInvalidLengthEtcdserver
  509. }
  510. if postIndex > l {
  511. return io.ErrUnexpectedEOF
  512. }
  513. m.Val = string(dAtA[iNdEx:postIndex])
  514. iNdEx = postIndex
  515. case 5:
  516. if wireType != 0 {
  517. return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType)
  518. }
  519. var v int
  520. for shift := uint(0); ; shift += 7 {
  521. if shift >= 64 {
  522. return ErrIntOverflowEtcdserver
  523. }
  524. if iNdEx >= l {
  525. return io.ErrUnexpectedEOF
  526. }
  527. b := dAtA[iNdEx]
  528. iNdEx++
  529. v |= int(b&0x7F) << shift
  530. if b < 0x80 {
  531. break
  532. }
  533. }
  534. m.Dir = bool(v != 0)
  535. case 6:
  536. if wireType != 2 {
  537. return fmt.Errorf("proto: wrong wireType = %d for field PrevValue", wireType)
  538. }
  539. var stringLen uint64
  540. for shift := uint(0); ; shift += 7 {
  541. if shift >= 64 {
  542. return ErrIntOverflowEtcdserver
  543. }
  544. if iNdEx >= l {
  545. return io.ErrUnexpectedEOF
  546. }
  547. b := dAtA[iNdEx]
  548. iNdEx++
  549. stringLen |= uint64(b&0x7F) << shift
  550. if b < 0x80 {
  551. break
  552. }
  553. }
  554. intStringLen := int(stringLen)
  555. if intStringLen < 0 {
  556. return ErrInvalidLengthEtcdserver
  557. }
  558. postIndex := iNdEx + intStringLen
  559. if postIndex < 0 {
  560. return ErrInvalidLengthEtcdserver
  561. }
  562. if postIndex > l {
  563. return io.ErrUnexpectedEOF
  564. }
  565. m.PrevValue = string(dAtA[iNdEx:postIndex])
  566. iNdEx = postIndex
  567. case 7:
  568. if wireType != 0 {
  569. return fmt.Errorf("proto: wrong wireType = %d for field PrevIndex", wireType)
  570. }
  571. m.PrevIndex = 0
  572. for shift := uint(0); ; shift += 7 {
  573. if shift >= 64 {
  574. return ErrIntOverflowEtcdserver
  575. }
  576. if iNdEx >= l {
  577. return io.ErrUnexpectedEOF
  578. }
  579. b := dAtA[iNdEx]
  580. iNdEx++
  581. m.PrevIndex |= uint64(b&0x7F) << shift
  582. if b < 0x80 {
  583. break
  584. }
  585. }
  586. case 8:
  587. if wireType != 0 {
  588. return fmt.Errorf("proto: wrong wireType = %d for field PrevExist", wireType)
  589. }
  590. var v int
  591. for shift := uint(0); ; shift += 7 {
  592. if shift >= 64 {
  593. return ErrIntOverflowEtcdserver
  594. }
  595. if iNdEx >= l {
  596. return io.ErrUnexpectedEOF
  597. }
  598. b := dAtA[iNdEx]
  599. iNdEx++
  600. v |= int(b&0x7F) << shift
  601. if b < 0x80 {
  602. break
  603. }
  604. }
  605. b := bool(v != 0)
  606. m.PrevExist = &b
  607. case 9:
  608. if wireType != 0 {
  609. return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType)
  610. }
  611. m.Expiration = 0
  612. for shift := uint(0); ; shift += 7 {
  613. if shift >= 64 {
  614. return ErrIntOverflowEtcdserver
  615. }
  616. if iNdEx >= l {
  617. return io.ErrUnexpectedEOF
  618. }
  619. b := dAtA[iNdEx]
  620. iNdEx++
  621. m.Expiration |= int64(b&0x7F) << shift
  622. if b < 0x80 {
  623. break
  624. }
  625. }
  626. case 10:
  627. if wireType != 0 {
  628. return fmt.Errorf("proto: wrong wireType = %d for field Wait", wireType)
  629. }
  630. var v int
  631. for shift := uint(0); ; shift += 7 {
  632. if shift >= 64 {
  633. return ErrIntOverflowEtcdserver
  634. }
  635. if iNdEx >= l {
  636. return io.ErrUnexpectedEOF
  637. }
  638. b := dAtA[iNdEx]
  639. iNdEx++
  640. v |= int(b&0x7F) << shift
  641. if b < 0x80 {
  642. break
  643. }
  644. }
  645. m.Wait = bool(v != 0)
  646. case 11:
  647. if wireType != 0 {
  648. return fmt.Errorf("proto: wrong wireType = %d for field Since", wireType)
  649. }
  650. m.Since = 0
  651. for shift := uint(0); ; shift += 7 {
  652. if shift >= 64 {
  653. return ErrIntOverflowEtcdserver
  654. }
  655. if iNdEx >= l {
  656. return io.ErrUnexpectedEOF
  657. }
  658. b := dAtA[iNdEx]
  659. iNdEx++
  660. m.Since |= uint64(b&0x7F) << shift
  661. if b < 0x80 {
  662. break
  663. }
  664. }
  665. case 12:
  666. if wireType != 0 {
  667. return fmt.Errorf("proto: wrong wireType = %d for field Recursive", wireType)
  668. }
  669. var v int
  670. for shift := uint(0); ; shift += 7 {
  671. if shift >= 64 {
  672. return ErrIntOverflowEtcdserver
  673. }
  674. if iNdEx >= l {
  675. return io.ErrUnexpectedEOF
  676. }
  677. b := dAtA[iNdEx]
  678. iNdEx++
  679. v |= int(b&0x7F) << shift
  680. if b < 0x80 {
  681. break
  682. }
  683. }
  684. m.Recursive = bool(v != 0)
  685. case 13:
  686. if wireType != 0 {
  687. return fmt.Errorf("proto: wrong wireType = %d for field Sorted", wireType)
  688. }
  689. var v int
  690. for shift := uint(0); ; shift += 7 {
  691. if shift >= 64 {
  692. return ErrIntOverflowEtcdserver
  693. }
  694. if iNdEx >= l {
  695. return io.ErrUnexpectedEOF
  696. }
  697. b := dAtA[iNdEx]
  698. iNdEx++
  699. v |= int(b&0x7F) << shift
  700. if b < 0x80 {
  701. break
  702. }
  703. }
  704. m.Sorted = bool(v != 0)
  705. case 14:
  706. if wireType != 0 {
  707. return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType)
  708. }
  709. var v int
  710. for shift := uint(0); ; shift += 7 {
  711. if shift >= 64 {
  712. return ErrIntOverflowEtcdserver
  713. }
  714. if iNdEx >= l {
  715. return io.ErrUnexpectedEOF
  716. }
  717. b := dAtA[iNdEx]
  718. iNdEx++
  719. v |= int(b&0x7F) << shift
  720. if b < 0x80 {
  721. break
  722. }
  723. }
  724. m.Quorum = bool(v != 0)
  725. case 15:
  726. if wireType != 0 {
  727. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  728. }
  729. m.Time = 0
  730. for shift := uint(0); ; shift += 7 {
  731. if shift >= 64 {
  732. return ErrIntOverflowEtcdserver
  733. }
  734. if iNdEx >= l {
  735. return io.ErrUnexpectedEOF
  736. }
  737. b := dAtA[iNdEx]
  738. iNdEx++
  739. m.Time |= int64(b&0x7F) << shift
  740. if b < 0x80 {
  741. break
  742. }
  743. }
  744. case 16:
  745. if wireType != 0 {
  746. return fmt.Errorf("proto: wrong wireType = %d for field Stream", wireType)
  747. }
  748. var v int
  749. for shift := uint(0); ; shift += 7 {
  750. if shift >= 64 {
  751. return ErrIntOverflowEtcdserver
  752. }
  753. if iNdEx >= l {
  754. return io.ErrUnexpectedEOF
  755. }
  756. b := dAtA[iNdEx]
  757. iNdEx++
  758. v |= int(b&0x7F) << shift
  759. if b < 0x80 {
  760. break
  761. }
  762. }
  763. m.Stream = bool(v != 0)
  764. case 17:
  765. if wireType != 0 {
  766. return fmt.Errorf("proto: wrong wireType = %d for field Refresh", wireType)
  767. }
  768. var v int
  769. for shift := uint(0); ; shift += 7 {
  770. if shift >= 64 {
  771. return ErrIntOverflowEtcdserver
  772. }
  773. if iNdEx >= l {
  774. return io.ErrUnexpectedEOF
  775. }
  776. b := dAtA[iNdEx]
  777. iNdEx++
  778. v |= int(b&0x7F) << shift
  779. if b < 0x80 {
  780. break
  781. }
  782. }
  783. b := bool(v != 0)
  784. m.Refresh = &b
  785. default:
  786. iNdEx = preIndex
  787. skippy, err := skipEtcdserver(dAtA[iNdEx:])
  788. if err != nil {
  789. return err
  790. }
  791. if skippy < 0 {
  792. return ErrInvalidLengthEtcdserver
  793. }
  794. if (iNdEx + skippy) < 0 {
  795. return ErrInvalidLengthEtcdserver
  796. }
  797. if (iNdEx + skippy) > l {
  798. return io.ErrUnexpectedEOF
  799. }
  800. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  801. iNdEx += skippy
  802. }
  803. }
  804. if iNdEx > l {
  805. return io.ErrUnexpectedEOF
  806. }
  807. return nil
  808. }
  809. func (m *Metadata) Unmarshal(dAtA []byte) error {
  810. l := len(dAtA)
  811. iNdEx := 0
  812. for iNdEx < l {
  813. preIndex := iNdEx
  814. var wire uint64
  815. for shift := uint(0); ; shift += 7 {
  816. if shift >= 64 {
  817. return ErrIntOverflowEtcdserver
  818. }
  819. if iNdEx >= l {
  820. return io.ErrUnexpectedEOF
  821. }
  822. b := dAtA[iNdEx]
  823. iNdEx++
  824. wire |= uint64(b&0x7F) << shift
  825. if b < 0x80 {
  826. break
  827. }
  828. }
  829. fieldNum := int32(wire >> 3)
  830. wireType := int(wire & 0x7)
  831. if wireType == 4 {
  832. return fmt.Errorf("proto: Metadata: wiretype end group for non-group")
  833. }
  834. if fieldNum <= 0 {
  835. return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire)
  836. }
  837. switch fieldNum {
  838. case 1:
  839. if wireType != 0 {
  840. return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
  841. }
  842. m.NodeID = 0
  843. for shift := uint(0); ; shift += 7 {
  844. if shift >= 64 {
  845. return ErrIntOverflowEtcdserver
  846. }
  847. if iNdEx >= l {
  848. return io.ErrUnexpectedEOF
  849. }
  850. b := dAtA[iNdEx]
  851. iNdEx++
  852. m.NodeID |= uint64(b&0x7F) << shift
  853. if b < 0x80 {
  854. break
  855. }
  856. }
  857. case 2:
  858. if wireType != 0 {
  859. return fmt.Errorf("proto: wrong wireType = %d for field ClusterID", wireType)
  860. }
  861. m.ClusterID = 0
  862. for shift := uint(0); ; shift += 7 {
  863. if shift >= 64 {
  864. return ErrIntOverflowEtcdserver
  865. }
  866. if iNdEx >= l {
  867. return io.ErrUnexpectedEOF
  868. }
  869. b := dAtA[iNdEx]
  870. iNdEx++
  871. m.ClusterID |= uint64(b&0x7F) << shift
  872. if b < 0x80 {
  873. break
  874. }
  875. }
  876. default:
  877. iNdEx = preIndex
  878. skippy, err := skipEtcdserver(dAtA[iNdEx:])
  879. if err != nil {
  880. return err
  881. }
  882. if skippy < 0 {
  883. return ErrInvalidLengthEtcdserver
  884. }
  885. if (iNdEx + skippy) < 0 {
  886. return ErrInvalidLengthEtcdserver
  887. }
  888. if (iNdEx + skippy) > l {
  889. return io.ErrUnexpectedEOF
  890. }
  891. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  892. iNdEx += skippy
  893. }
  894. }
  895. if iNdEx > l {
  896. return io.ErrUnexpectedEOF
  897. }
  898. return nil
  899. }
  900. func skipEtcdserver(dAtA []byte) (n int, err error) {
  901. l := len(dAtA)
  902. iNdEx := 0
  903. for iNdEx < l {
  904. var wire uint64
  905. for shift := uint(0); ; shift += 7 {
  906. if shift >= 64 {
  907. return 0, ErrIntOverflowEtcdserver
  908. }
  909. if iNdEx >= l {
  910. return 0, io.ErrUnexpectedEOF
  911. }
  912. b := dAtA[iNdEx]
  913. iNdEx++
  914. wire |= (uint64(b) & 0x7F) << shift
  915. if b < 0x80 {
  916. break
  917. }
  918. }
  919. wireType := int(wire & 0x7)
  920. switch wireType {
  921. case 0:
  922. for shift := uint(0); ; shift += 7 {
  923. if shift >= 64 {
  924. return 0, ErrIntOverflowEtcdserver
  925. }
  926. if iNdEx >= l {
  927. return 0, io.ErrUnexpectedEOF
  928. }
  929. iNdEx++
  930. if dAtA[iNdEx-1] < 0x80 {
  931. break
  932. }
  933. }
  934. return iNdEx, nil
  935. case 1:
  936. iNdEx += 8
  937. return iNdEx, nil
  938. case 2:
  939. var length int
  940. for shift := uint(0); ; shift += 7 {
  941. if shift >= 64 {
  942. return 0, ErrIntOverflowEtcdserver
  943. }
  944. if iNdEx >= l {
  945. return 0, io.ErrUnexpectedEOF
  946. }
  947. b := dAtA[iNdEx]
  948. iNdEx++
  949. length |= (int(b) & 0x7F) << shift
  950. if b < 0x80 {
  951. break
  952. }
  953. }
  954. if length < 0 {
  955. return 0, ErrInvalidLengthEtcdserver
  956. }
  957. iNdEx += length
  958. if iNdEx < 0 {
  959. return 0, ErrInvalidLengthEtcdserver
  960. }
  961. return iNdEx, nil
  962. case 3:
  963. for {
  964. var innerWire uint64
  965. var start int = iNdEx
  966. for shift := uint(0); ; shift += 7 {
  967. if shift >= 64 {
  968. return 0, ErrIntOverflowEtcdserver
  969. }
  970. if iNdEx >= l {
  971. return 0, io.ErrUnexpectedEOF
  972. }
  973. b := dAtA[iNdEx]
  974. iNdEx++
  975. innerWire |= (uint64(b) & 0x7F) << shift
  976. if b < 0x80 {
  977. break
  978. }
  979. }
  980. innerWireType := int(innerWire & 0x7)
  981. if innerWireType == 4 {
  982. break
  983. }
  984. next, err := skipEtcdserver(dAtA[start:])
  985. if err != nil {
  986. return 0, err
  987. }
  988. iNdEx = start + next
  989. if iNdEx < 0 {
  990. return 0, ErrInvalidLengthEtcdserver
  991. }
  992. }
  993. return iNdEx, nil
  994. case 4:
  995. return iNdEx, nil
  996. case 5:
  997. iNdEx += 4
  998. return iNdEx, nil
  999. default:
  1000. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1001. }
  1002. }
  1003. panic("unreachable")
  1004. }
  1005. var (
  1006. ErrInvalidLengthEtcdserver = fmt.Errorf("proto: negative length found during unmarshaling")
  1007. ErrIntOverflowEtcdserver = fmt.Errorf("proto: integer overflow")
  1008. )