etcdserver.pb.go 24 KB

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