overlay.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. // Code generated by protoc-gen-gogo.
  2. // source: overlay.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package overlay is a generated protocol buffer package.
  6. It is generated from these files:
  7. overlay.proto
  8. It has these top-level messages:
  9. PeerRecord
  10. */
  11. package overlay
  12. import proto "github.com/gogo/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import _ "github.com/gogo/protobuf/gogoproto"
  16. import strings "strings"
  17. import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
  18. import sort "sort"
  19. import strconv "strconv"
  20. import reflect "reflect"
  21. import io "io"
  22. // Reference imports to suppress errors if they are not otherwise used.
  23. var _ = proto.Marshal
  24. var _ = fmt.Errorf
  25. var _ = math.Inf
  26. // This is a compile-time assertion to ensure that this generated file
  27. // is compatible with the proto package it is being compiled against.
  28. const _ = proto.GoGoProtoPackageIsVersion1
  29. // PeerRecord defines the information corresponding to a peer
  30. // container in the overlay network.
  31. type PeerRecord struct {
  32. // Endpoint IP is the IP of the container attachment on the
  33. // given overlay network.
  34. EndpointIP string `protobuf:"bytes,1,opt,name=endpoint_ip,json=endpointIp,proto3" json:"endpoint_ip,omitempty"`
  35. // Endpoint MAC is the mac address of the container attachment
  36. // on the given overlay network.
  37. EndpointMAC string `protobuf:"bytes,2,opt,name=endpoint_mac,json=endpointMac,proto3" json:"endpoint_mac,omitempty"`
  38. // Tunnel Endpoint IP defines the host IP for the host in
  39. // which this container is running and can be reached by
  40. // building a tunnel to that host IP.
  41. TunnelEndpointIP string `protobuf:"bytes,3,opt,name=tunnel_endpoint_ip,json=tunnelEndpointIp,proto3" json:"tunnel_endpoint_ip,omitempty"`
  42. }
  43. func (m *PeerRecord) Reset() { *m = PeerRecord{} }
  44. func (*PeerRecord) ProtoMessage() {}
  45. func (*PeerRecord) Descriptor() ([]byte, []int) { return fileDescriptorOverlay, []int{0} }
  46. func init() {
  47. proto.RegisterType((*PeerRecord)(nil), "overlay.PeerRecord")
  48. }
  49. func (this *PeerRecord) GoString() string {
  50. if this == nil {
  51. return "nil"
  52. }
  53. s := make([]string, 0, 7)
  54. s = append(s, "&overlay.PeerRecord{")
  55. s = append(s, "EndpointIP: "+fmt.Sprintf("%#v", this.EndpointIP)+",\n")
  56. s = append(s, "EndpointMAC: "+fmt.Sprintf("%#v", this.EndpointMAC)+",\n")
  57. s = append(s, "TunnelEndpointIP: "+fmt.Sprintf("%#v", this.TunnelEndpointIP)+",\n")
  58. s = append(s, "}")
  59. return strings.Join(s, "")
  60. }
  61. func valueToGoStringOverlay(v interface{}, typ string) string {
  62. rv := reflect.ValueOf(v)
  63. if rv.IsNil() {
  64. return "nil"
  65. }
  66. pv := reflect.Indirect(rv).Interface()
  67. return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
  68. }
  69. func extensionToGoStringOverlay(e map[int32]github_com_gogo_protobuf_proto.Extension) string {
  70. if e == nil {
  71. return "nil"
  72. }
  73. s := "map[int32]proto.Extension{"
  74. keys := make([]int, 0, len(e))
  75. for k := range e {
  76. keys = append(keys, int(k))
  77. }
  78. sort.Ints(keys)
  79. ss := []string{}
  80. for _, k := range keys {
  81. ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
  82. }
  83. s += strings.Join(ss, ",") + "}"
  84. return s
  85. }
  86. func (m *PeerRecord) Marshal() (data []byte, err error) {
  87. size := m.Size()
  88. data = make([]byte, size)
  89. n, err := m.MarshalTo(data)
  90. if err != nil {
  91. return nil, err
  92. }
  93. return data[:n], nil
  94. }
  95. func (m *PeerRecord) MarshalTo(data []byte) (int, error) {
  96. var i int
  97. _ = i
  98. var l int
  99. _ = l
  100. if len(m.EndpointIP) > 0 {
  101. data[i] = 0xa
  102. i++
  103. i = encodeVarintOverlay(data, i, uint64(len(m.EndpointIP)))
  104. i += copy(data[i:], m.EndpointIP)
  105. }
  106. if len(m.EndpointMAC) > 0 {
  107. data[i] = 0x12
  108. i++
  109. i = encodeVarintOverlay(data, i, uint64(len(m.EndpointMAC)))
  110. i += copy(data[i:], m.EndpointMAC)
  111. }
  112. if len(m.TunnelEndpointIP) > 0 {
  113. data[i] = 0x1a
  114. i++
  115. i = encodeVarintOverlay(data, i, uint64(len(m.TunnelEndpointIP)))
  116. i += copy(data[i:], m.TunnelEndpointIP)
  117. }
  118. return i, nil
  119. }
  120. func encodeFixed64Overlay(data []byte, offset int, v uint64) int {
  121. data[offset] = uint8(v)
  122. data[offset+1] = uint8(v >> 8)
  123. data[offset+2] = uint8(v >> 16)
  124. data[offset+3] = uint8(v >> 24)
  125. data[offset+4] = uint8(v >> 32)
  126. data[offset+5] = uint8(v >> 40)
  127. data[offset+6] = uint8(v >> 48)
  128. data[offset+7] = uint8(v >> 56)
  129. return offset + 8
  130. }
  131. func encodeFixed32Overlay(data []byte, offset int, v uint32) int {
  132. data[offset] = uint8(v)
  133. data[offset+1] = uint8(v >> 8)
  134. data[offset+2] = uint8(v >> 16)
  135. data[offset+3] = uint8(v >> 24)
  136. return offset + 4
  137. }
  138. func encodeVarintOverlay(data []byte, offset int, v uint64) int {
  139. for v >= 1<<7 {
  140. data[offset] = uint8(v&0x7f | 0x80)
  141. v >>= 7
  142. offset++
  143. }
  144. data[offset] = uint8(v)
  145. return offset + 1
  146. }
  147. func (m *PeerRecord) Size() (n int) {
  148. var l int
  149. _ = l
  150. l = len(m.EndpointIP)
  151. if l > 0 {
  152. n += 1 + l + sovOverlay(uint64(l))
  153. }
  154. l = len(m.EndpointMAC)
  155. if l > 0 {
  156. n += 1 + l + sovOverlay(uint64(l))
  157. }
  158. l = len(m.TunnelEndpointIP)
  159. if l > 0 {
  160. n += 1 + l + sovOverlay(uint64(l))
  161. }
  162. return n
  163. }
  164. func sovOverlay(x uint64) (n int) {
  165. for {
  166. n++
  167. x >>= 7
  168. if x == 0 {
  169. break
  170. }
  171. }
  172. return n
  173. }
  174. func sozOverlay(x uint64) (n int) {
  175. return sovOverlay(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  176. }
  177. func (this *PeerRecord) String() string {
  178. if this == nil {
  179. return "nil"
  180. }
  181. s := strings.Join([]string{`&PeerRecord{`,
  182. `EndpointIP:` + fmt.Sprintf("%v", this.EndpointIP) + `,`,
  183. `EndpointMAC:` + fmt.Sprintf("%v", this.EndpointMAC) + `,`,
  184. `TunnelEndpointIP:` + fmt.Sprintf("%v", this.TunnelEndpointIP) + `,`,
  185. `}`,
  186. }, "")
  187. return s
  188. }
  189. func valueToStringOverlay(v interface{}) string {
  190. rv := reflect.ValueOf(v)
  191. if rv.IsNil() {
  192. return "nil"
  193. }
  194. pv := reflect.Indirect(rv).Interface()
  195. return fmt.Sprintf("*%v", pv)
  196. }
  197. func (m *PeerRecord) Unmarshal(data []byte) error {
  198. l := len(data)
  199. iNdEx := 0
  200. for iNdEx < l {
  201. preIndex := iNdEx
  202. var wire uint64
  203. for shift := uint(0); ; shift += 7 {
  204. if shift >= 64 {
  205. return ErrIntOverflowOverlay
  206. }
  207. if iNdEx >= l {
  208. return io.ErrUnexpectedEOF
  209. }
  210. b := data[iNdEx]
  211. iNdEx++
  212. wire |= (uint64(b) & 0x7F) << shift
  213. if b < 0x80 {
  214. break
  215. }
  216. }
  217. fieldNum := int32(wire >> 3)
  218. wireType := int(wire & 0x7)
  219. if wireType == 4 {
  220. return fmt.Errorf("proto: PeerRecord: wiretype end group for non-group")
  221. }
  222. if fieldNum <= 0 {
  223. return fmt.Errorf("proto: PeerRecord: illegal tag %d (wire type %d)", fieldNum, wire)
  224. }
  225. switch fieldNum {
  226. case 1:
  227. if wireType != 2 {
  228. return fmt.Errorf("proto: wrong wireType = %d for field EndpointIP", wireType)
  229. }
  230. var stringLen uint64
  231. for shift := uint(0); ; shift += 7 {
  232. if shift >= 64 {
  233. return ErrIntOverflowOverlay
  234. }
  235. if iNdEx >= l {
  236. return io.ErrUnexpectedEOF
  237. }
  238. b := data[iNdEx]
  239. iNdEx++
  240. stringLen |= (uint64(b) & 0x7F) << shift
  241. if b < 0x80 {
  242. break
  243. }
  244. }
  245. intStringLen := int(stringLen)
  246. if intStringLen < 0 {
  247. return ErrInvalidLengthOverlay
  248. }
  249. postIndex := iNdEx + intStringLen
  250. if postIndex > l {
  251. return io.ErrUnexpectedEOF
  252. }
  253. m.EndpointIP = string(data[iNdEx:postIndex])
  254. iNdEx = postIndex
  255. case 2:
  256. if wireType != 2 {
  257. return fmt.Errorf("proto: wrong wireType = %d for field EndpointMAC", wireType)
  258. }
  259. var stringLen uint64
  260. for shift := uint(0); ; shift += 7 {
  261. if shift >= 64 {
  262. return ErrIntOverflowOverlay
  263. }
  264. if iNdEx >= l {
  265. return io.ErrUnexpectedEOF
  266. }
  267. b := data[iNdEx]
  268. iNdEx++
  269. stringLen |= (uint64(b) & 0x7F) << shift
  270. if b < 0x80 {
  271. break
  272. }
  273. }
  274. intStringLen := int(stringLen)
  275. if intStringLen < 0 {
  276. return ErrInvalidLengthOverlay
  277. }
  278. postIndex := iNdEx + intStringLen
  279. if postIndex > l {
  280. return io.ErrUnexpectedEOF
  281. }
  282. m.EndpointMAC = string(data[iNdEx:postIndex])
  283. iNdEx = postIndex
  284. case 3:
  285. if wireType != 2 {
  286. return fmt.Errorf("proto: wrong wireType = %d for field TunnelEndpointIP", wireType)
  287. }
  288. var stringLen uint64
  289. for shift := uint(0); ; shift += 7 {
  290. if shift >= 64 {
  291. return ErrIntOverflowOverlay
  292. }
  293. if iNdEx >= l {
  294. return io.ErrUnexpectedEOF
  295. }
  296. b := data[iNdEx]
  297. iNdEx++
  298. stringLen |= (uint64(b) & 0x7F) << shift
  299. if b < 0x80 {
  300. break
  301. }
  302. }
  303. intStringLen := int(stringLen)
  304. if intStringLen < 0 {
  305. return ErrInvalidLengthOverlay
  306. }
  307. postIndex := iNdEx + intStringLen
  308. if postIndex > l {
  309. return io.ErrUnexpectedEOF
  310. }
  311. m.TunnelEndpointIP = string(data[iNdEx:postIndex])
  312. iNdEx = postIndex
  313. default:
  314. iNdEx = preIndex
  315. skippy, err := skipOverlay(data[iNdEx:])
  316. if err != nil {
  317. return err
  318. }
  319. if skippy < 0 {
  320. return ErrInvalidLengthOverlay
  321. }
  322. if (iNdEx + skippy) > l {
  323. return io.ErrUnexpectedEOF
  324. }
  325. iNdEx += skippy
  326. }
  327. }
  328. if iNdEx > l {
  329. return io.ErrUnexpectedEOF
  330. }
  331. return nil
  332. }
  333. func skipOverlay(data []byte) (n int, err error) {
  334. l := len(data)
  335. iNdEx := 0
  336. for iNdEx < l {
  337. var wire uint64
  338. for shift := uint(0); ; shift += 7 {
  339. if shift >= 64 {
  340. return 0, ErrIntOverflowOverlay
  341. }
  342. if iNdEx >= l {
  343. return 0, io.ErrUnexpectedEOF
  344. }
  345. b := data[iNdEx]
  346. iNdEx++
  347. wire |= (uint64(b) & 0x7F) << shift
  348. if b < 0x80 {
  349. break
  350. }
  351. }
  352. wireType := int(wire & 0x7)
  353. switch wireType {
  354. case 0:
  355. for shift := uint(0); ; shift += 7 {
  356. if shift >= 64 {
  357. return 0, ErrIntOverflowOverlay
  358. }
  359. if iNdEx >= l {
  360. return 0, io.ErrUnexpectedEOF
  361. }
  362. iNdEx++
  363. if data[iNdEx-1] < 0x80 {
  364. break
  365. }
  366. }
  367. return iNdEx, nil
  368. case 1:
  369. iNdEx += 8
  370. return iNdEx, nil
  371. case 2:
  372. var length int
  373. for shift := uint(0); ; shift += 7 {
  374. if shift >= 64 {
  375. return 0, ErrIntOverflowOverlay
  376. }
  377. if iNdEx >= l {
  378. return 0, io.ErrUnexpectedEOF
  379. }
  380. b := data[iNdEx]
  381. iNdEx++
  382. length |= (int(b) & 0x7F) << shift
  383. if b < 0x80 {
  384. break
  385. }
  386. }
  387. iNdEx += length
  388. if length < 0 {
  389. return 0, ErrInvalidLengthOverlay
  390. }
  391. return iNdEx, nil
  392. case 3:
  393. for {
  394. var innerWire uint64
  395. var start int = iNdEx
  396. for shift := uint(0); ; shift += 7 {
  397. if shift >= 64 {
  398. return 0, ErrIntOverflowOverlay
  399. }
  400. if iNdEx >= l {
  401. return 0, io.ErrUnexpectedEOF
  402. }
  403. b := data[iNdEx]
  404. iNdEx++
  405. innerWire |= (uint64(b) & 0x7F) << shift
  406. if b < 0x80 {
  407. break
  408. }
  409. }
  410. innerWireType := int(innerWire & 0x7)
  411. if innerWireType == 4 {
  412. break
  413. }
  414. next, err := skipOverlay(data[start:])
  415. if err != nil {
  416. return 0, err
  417. }
  418. iNdEx = start + next
  419. }
  420. return iNdEx, nil
  421. case 4:
  422. return iNdEx, nil
  423. case 5:
  424. iNdEx += 4
  425. return iNdEx, nil
  426. default:
  427. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  428. }
  429. }
  430. panic("unreachable")
  431. }
  432. var (
  433. ErrInvalidLengthOverlay = fmt.Errorf("proto: negative length found during unmarshaling")
  434. ErrIntOverflowOverlay = fmt.Errorf("proto: integer overflow")
  435. )
  436. var fileDescriptorOverlay = []byte{
  437. // 195 bytes of a gzipped FileDescriptorProto
  438. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2f, 0x4b, 0x2d,
  439. 0xca, 0x49, 0xac, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x44, 0xd2,
  440. 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x69, 0x2b, 0x23, 0x17, 0x57, 0x40,
  441. 0x6a, 0x6a, 0x51, 0x50, 0x6a, 0x72, 0x7e, 0x51, 0x8a, 0x90, 0x3e, 0x17, 0x77, 0x6a, 0x5e, 0x4a,
  442. 0x41, 0x7e, 0x66, 0x5e, 0x49, 0x7c, 0x66, 0x81, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x13, 0xdf,
  443. 0xa3, 0x7b, 0xf2, 0x5c, 0xae, 0x50, 0x61, 0xcf, 0x80, 0x20, 0x2e, 0x98, 0x12, 0xcf, 0x02, 0x21,
  444. 0x23, 0x2e, 0x1e, 0xb8, 0x86, 0xdc, 0xc4, 0x64, 0x09, 0x26, 0xb0, 0x0e, 0x7e, 0xa0, 0x0e, 0x6e,
  445. 0x98, 0x0e, 0x5f, 0x47, 0xe7, 0x20, 0xb8, 0xa9, 0xbe, 0x89, 0xc9, 0x42, 0x4e, 0x5c, 0x42, 0x25,
  446. 0xa5, 0x79, 0x79, 0xa9, 0x39, 0xf1, 0xc8, 0x76, 0x31, 0x83, 0x75, 0x8a, 0x00, 0x75, 0x0a, 0x84,
  447. 0x80, 0x65, 0x91, 0x6c, 0x14, 0x28, 0x41, 0x15, 0x29, 0x70, 0x92, 0xb8, 0xf1, 0x50, 0x8e, 0xe1,
  448. 0xc3, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0xe2,
  449. 0x24, 0x36, 0xb0, 0xc7, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbf, 0xd7, 0x7d, 0x7d, 0x08,
  450. 0x01, 0x00, 0x00,
  451. }