overlay.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: overlay.proto
  3. package overlay
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. io "io"
  9. math "math"
  10. math_bits "math/bits"
  11. reflect "reflect"
  12. strings "strings"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  23. // PeerRecord defines the information corresponding to a peer
  24. // container in the overlay network.
  25. type PeerRecord struct {
  26. // Endpoint IP is the IP of the container attachment on the
  27. // given overlay network.
  28. EndpointIP string `protobuf:"bytes,1,opt,name=endpoint_ip,json=endpointIp,proto3" json:"endpoint_ip,omitempty"`
  29. // Endpoint MAC is the mac address of the container attachment
  30. // on the given overlay network.
  31. EndpointMAC string `protobuf:"bytes,2,opt,name=endpoint_mac,json=endpointMac,proto3" json:"endpoint_mac,omitempty"`
  32. // Tunnel Endpoint IP defines the host IP for the host in
  33. // which this container is running and can be reached by
  34. // building a tunnel to that host IP.
  35. TunnelEndpointIP string `protobuf:"bytes,3,opt,name=tunnel_endpoint_ip,json=tunnelEndpointIp,proto3" json:"tunnel_endpoint_ip,omitempty"`
  36. }
  37. func (m *PeerRecord) Reset() { *m = PeerRecord{} }
  38. func (*PeerRecord) ProtoMessage() {}
  39. func (*PeerRecord) Descriptor() ([]byte, []int) {
  40. return fileDescriptor_61fc82527fbe24ad, []int{0}
  41. }
  42. func (m *PeerRecord) XXX_Unmarshal(b []byte) error {
  43. return m.Unmarshal(b)
  44. }
  45. func (m *PeerRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  46. if deterministic {
  47. return xxx_messageInfo_PeerRecord.Marshal(b, m, deterministic)
  48. } else {
  49. b = b[:cap(b)]
  50. n, err := m.MarshalToSizedBuffer(b)
  51. if err != nil {
  52. return nil, err
  53. }
  54. return b[:n], nil
  55. }
  56. }
  57. func (m *PeerRecord) XXX_Merge(src proto.Message) {
  58. xxx_messageInfo_PeerRecord.Merge(m, src)
  59. }
  60. func (m *PeerRecord) XXX_Size() int {
  61. return m.Size()
  62. }
  63. func (m *PeerRecord) XXX_DiscardUnknown() {
  64. xxx_messageInfo_PeerRecord.DiscardUnknown(m)
  65. }
  66. var xxx_messageInfo_PeerRecord proto.InternalMessageInfo
  67. func (m *PeerRecord) GetEndpointIP() string {
  68. if m != nil {
  69. return m.EndpointIP
  70. }
  71. return ""
  72. }
  73. func (m *PeerRecord) GetEndpointMAC() string {
  74. if m != nil {
  75. return m.EndpointMAC
  76. }
  77. return ""
  78. }
  79. func (m *PeerRecord) GetTunnelEndpointIP() string {
  80. if m != nil {
  81. return m.TunnelEndpointIP
  82. }
  83. return ""
  84. }
  85. func init() {
  86. proto.RegisterType((*PeerRecord)(nil), "overlay.PeerRecord")
  87. }
  88. func init() { proto.RegisterFile("overlay.proto", fileDescriptor_61fc82527fbe24ad) }
  89. var fileDescriptor_61fc82527fbe24ad = []byte{
  90. // 233 bytes of a gzipped FileDescriptorProto
  91. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2f, 0x4b, 0x2d,
  92. 0xca, 0x49, 0xac, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3,
  93. 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1,
  94. 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0x6d, 0x65, 0xe4, 0xe2,
  95. 0x0a, 0x48, 0x4d, 0x2d, 0x0a, 0x4a, 0x4d, 0xce, 0x2f, 0x4a, 0x11, 0xd2, 0xe7, 0xe2, 0x4e, 0xcd,
  96. 0x4b, 0x29, 0xc8, 0xcf, 0xcc, 0x2b, 0x89, 0xcf, 0x2c, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74,
  97. 0xe2, 0x7b, 0x74, 0x4f, 0x9e, 0xcb, 0x15, 0x2a, 0xec, 0x19, 0x10, 0xc4, 0x05, 0x53, 0xe2, 0x59,
  98. 0x20, 0x64, 0xc4, 0xc5, 0x03, 0xd7, 0x90, 0x9b, 0x98, 0x2c, 0xc1, 0x04, 0xd6, 0xc1, 0xff, 0xe8,
  99. 0x9e, 0x3c, 0x37, 0x4c, 0x87, 0xaf, 0xa3, 0x73, 0x10, 0xdc, 0x54, 0xdf, 0xc4, 0x64, 0x21, 0x27,
  100. 0x2e, 0xa1, 0x92, 0xd2, 0xbc, 0xbc, 0xd4, 0x9c, 0x78, 0x64, 0xbb, 0x98, 0xc1, 0x3a, 0x45, 0x1e,
  101. 0xdd, 0x93, 0x17, 0x08, 0x01, 0xcb, 0x22, 0xd9, 0x28, 0x50, 0x82, 0x2a, 0x52, 0xe0, 0xa4, 0x72,
  102. 0xe3, 0xa1, 0x1c, 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63,
  103. 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96,
  104. 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 0x49, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff,
  105. 0xff, 0xd4, 0x37, 0x59, 0xc8, 0x2d, 0x01, 0x00, 0x00,
  106. }
  107. func (this *PeerRecord) GoString() string {
  108. if this == nil {
  109. return "nil"
  110. }
  111. s := make([]string, 0, 7)
  112. s = append(s, "&overlay.PeerRecord{")
  113. s = append(s, "EndpointIP: "+fmt.Sprintf("%#v", this.EndpointIP)+",\n")
  114. s = append(s, "EndpointMAC: "+fmt.Sprintf("%#v", this.EndpointMAC)+",\n")
  115. s = append(s, "TunnelEndpointIP: "+fmt.Sprintf("%#v", this.TunnelEndpointIP)+",\n")
  116. s = append(s, "}")
  117. return strings.Join(s, "")
  118. }
  119. func valueToGoStringOverlay(v interface{}, typ string) string {
  120. rv := reflect.ValueOf(v)
  121. if rv.IsNil() {
  122. return "nil"
  123. }
  124. pv := reflect.Indirect(rv).Interface()
  125. return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
  126. }
  127. func (m *PeerRecord) Marshal() (dAtA []byte, err error) {
  128. size := m.Size()
  129. dAtA = make([]byte, size)
  130. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  131. if err != nil {
  132. return nil, err
  133. }
  134. return dAtA[:n], nil
  135. }
  136. func (m *PeerRecord) MarshalTo(dAtA []byte) (int, error) {
  137. size := m.Size()
  138. return m.MarshalToSizedBuffer(dAtA[:size])
  139. }
  140. func (m *PeerRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  141. i := len(dAtA)
  142. _ = i
  143. var l int
  144. _ = l
  145. if len(m.TunnelEndpointIP) > 0 {
  146. i -= len(m.TunnelEndpointIP)
  147. copy(dAtA[i:], m.TunnelEndpointIP)
  148. i = encodeVarintOverlay(dAtA, i, uint64(len(m.TunnelEndpointIP)))
  149. i--
  150. dAtA[i] = 0x1a
  151. }
  152. if len(m.EndpointMAC) > 0 {
  153. i -= len(m.EndpointMAC)
  154. copy(dAtA[i:], m.EndpointMAC)
  155. i = encodeVarintOverlay(dAtA, i, uint64(len(m.EndpointMAC)))
  156. i--
  157. dAtA[i] = 0x12
  158. }
  159. if len(m.EndpointIP) > 0 {
  160. i -= len(m.EndpointIP)
  161. copy(dAtA[i:], m.EndpointIP)
  162. i = encodeVarintOverlay(dAtA, i, uint64(len(m.EndpointIP)))
  163. i--
  164. dAtA[i] = 0xa
  165. }
  166. return len(dAtA) - i, nil
  167. }
  168. func encodeVarintOverlay(dAtA []byte, offset int, v uint64) int {
  169. offset -= sovOverlay(v)
  170. base := offset
  171. for v >= 1<<7 {
  172. dAtA[offset] = uint8(v&0x7f | 0x80)
  173. v >>= 7
  174. offset++
  175. }
  176. dAtA[offset] = uint8(v)
  177. return base
  178. }
  179. func (m *PeerRecord) Size() (n int) {
  180. if m == nil {
  181. return 0
  182. }
  183. var l int
  184. _ = l
  185. l = len(m.EndpointIP)
  186. if l > 0 {
  187. n += 1 + l + sovOverlay(uint64(l))
  188. }
  189. l = len(m.EndpointMAC)
  190. if l > 0 {
  191. n += 1 + l + sovOverlay(uint64(l))
  192. }
  193. l = len(m.TunnelEndpointIP)
  194. if l > 0 {
  195. n += 1 + l + sovOverlay(uint64(l))
  196. }
  197. return n
  198. }
  199. func sovOverlay(x uint64) (n int) {
  200. return (math_bits.Len64(x|1) + 6) / 7
  201. }
  202. func sozOverlay(x uint64) (n int) {
  203. return sovOverlay(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  204. }
  205. func (this *PeerRecord) String() string {
  206. if this == nil {
  207. return "nil"
  208. }
  209. s := strings.Join([]string{`&PeerRecord{`,
  210. `EndpointIP:` + fmt.Sprintf("%v", this.EndpointIP) + `,`,
  211. `EndpointMAC:` + fmt.Sprintf("%v", this.EndpointMAC) + `,`,
  212. `TunnelEndpointIP:` + fmt.Sprintf("%v", this.TunnelEndpointIP) + `,`,
  213. `}`,
  214. }, "")
  215. return s
  216. }
  217. func valueToStringOverlay(v interface{}) string {
  218. rv := reflect.ValueOf(v)
  219. if rv.IsNil() {
  220. return "nil"
  221. }
  222. pv := reflect.Indirect(rv).Interface()
  223. return fmt.Sprintf("*%v", pv)
  224. }
  225. func (m *PeerRecord) Unmarshal(dAtA []byte) error {
  226. l := len(dAtA)
  227. iNdEx := 0
  228. for iNdEx < l {
  229. preIndex := iNdEx
  230. var wire 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. wire |= uint64(b&0x7F) << shift
  241. if b < 0x80 {
  242. break
  243. }
  244. }
  245. fieldNum := int32(wire >> 3)
  246. wireType := int(wire & 0x7)
  247. if wireType == 4 {
  248. return fmt.Errorf("proto: PeerRecord: wiretype end group for non-group")
  249. }
  250. if fieldNum <= 0 {
  251. return fmt.Errorf("proto: PeerRecord: illegal tag %d (wire type %d)", fieldNum, wire)
  252. }
  253. switch fieldNum {
  254. case 1:
  255. if wireType != 2 {
  256. return fmt.Errorf("proto: wrong wireType = %d for field EndpointIP", wireType)
  257. }
  258. var stringLen uint64
  259. for shift := uint(0); ; shift += 7 {
  260. if shift >= 64 {
  261. return ErrIntOverflowOverlay
  262. }
  263. if iNdEx >= l {
  264. return io.ErrUnexpectedEOF
  265. }
  266. b := dAtA[iNdEx]
  267. iNdEx++
  268. stringLen |= uint64(b&0x7F) << shift
  269. if b < 0x80 {
  270. break
  271. }
  272. }
  273. intStringLen := int(stringLen)
  274. if intStringLen < 0 {
  275. return ErrInvalidLengthOverlay
  276. }
  277. postIndex := iNdEx + intStringLen
  278. if postIndex < 0 {
  279. return ErrInvalidLengthOverlay
  280. }
  281. if postIndex > l {
  282. return io.ErrUnexpectedEOF
  283. }
  284. m.EndpointIP = string(dAtA[iNdEx:postIndex])
  285. iNdEx = postIndex
  286. case 2:
  287. if wireType != 2 {
  288. return fmt.Errorf("proto: wrong wireType = %d for field EndpointMAC", wireType)
  289. }
  290. var stringLen uint64
  291. for shift := uint(0); ; shift += 7 {
  292. if shift >= 64 {
  293. return ErrIntOverflowOverlay
  294. }
  295. if iNdEx >= l {
  296. return io.ErrUnexpectedEOF
  297. }
  298. b := dAtA[iNdEx]
  299. iNdEx++
  300. stringLen |= uint64(b&0x7F) << shift
  301. if b < 0x80 {
  302. break
  303. }
  304. }
  305. intStringLen := int(stringLen)
  306. if intStringLen < 0 {
  307. return ErrInvalidLengthOverlay
  308. }
  309. postIndex := iNdEx + intStringLen
  310. if postIndex < 0 {
  311. return ErrInvalidLengthOverlay
  312. }
  313. if postIndex > l {
  314. return io.ErrUnexpectedEOF
  315. }
  316. m.EndpointMAC = string(dAtA[iNdEx:postIndex])
  317. iNdEx = postIndex
  318. case 3:
  319. if wireType != 2 {
  320. return fmt.Errorf("proto: wrong wireType = %d for field TunnelEndpointIP", wireType)
  321. }
  322. var stringLen uint64
  323. for shift := uint(0); ; shift += 7 {
  324. if shift >= 64 {
  325. return ErrIntOverflowOverlay
  326. }
  327. if iNdEx >= l {
  328. return io.ErrUnexpectedEOF
  329. }
  330. b := dAtA[iNdEx]
  331. iNdEx++
  332. stringLen |= uint64(b&0x7F) << shift
  333. if b < 0x80 {
  334. break
  335. }
  336. }
  337. intStringLen := int(stringLen)
  338. if intStringLen < 0 {
  339. return ErrInvalidLengthOverlay
  340. }
  341. postIndex := iNdEx + intStringLen
  342. if postIndex < 0 {
  343. return ErrInvalidLengthOverlay
  344. }
  345. if postIndex > l {
  346. return io.ErrUnexpectedEOF
  347. }
  348. m.TunnelEndpointIP = string(dAtA[iNdEx:postIndex])
  349. iNdEx = postIndex
  350. default:
  351. iNdEx = preIndex
  352. skippy, err := skipOverlay(dAtA[iNdEx:])
  353. if err != nil {
  354. return err
  355. }
  356. if (skippy < 0) || (iNdEx+skippy) < 0 {
  357. return ErrInvalidLengthOverlay
  358. }
  359. if (iNdEx + skippy) > l {
  360. return io.ErrUnexpectedEOF
  361. }
  362. iNdEx += skippy
  363. }
  364. }
  365. if iNdEx > l {
  366. return io.ErrUnexpectedEOF
  367. }
  368. return nil
  369. }
  370. func skipOverlay(dAtA []byte) (n int, err error) {
  371. l := len(dAtA)
  372. iNdEx := 0
  373. depth := 0
  374. for iNdEx < l {
  375. var wire uint64
  376. for shift := uint(0); ; shift += 7 {
  377. if shift >= 64 {
  378. return 0, ErrIntOverflowOverlay
  379. }
  380. if iNdEx >= l {
  381. return 0, io.ErrUnexpectedEOF
  382. }
  383. b := dAtA[iNdEx]
  384. iNdEx++
  385. wire |= (uint64(b) & 0x7F) << shift
  386. if b < 0x80 {
  387. break
  388. }
  389. }
  390. wireType := int(wire & 0x7)
  391. switch wireType {
  392. case 0:
  393. for shift := uint(0); ; shift += 7 {
  394. if shift >= 64 {
  395. return 0, ErrIntOverflowOverlay
  396. }
  397. if iNdEx >= l {
  398. return 0, io.ErrUnexpectedEOF
  399. }
  400. iNdEx++
  401. if dAtA[iNdEx-1] < 0x80 {
  402. break
  403. }
  404. }
  405. case 1:
  406. iNdEx += 8
  407. case 2:
  408. var length int
  409. for shift := uint(0); ; shift += 7 {
  410. if shift >= 64 {
  411. return 0, ErrIntOverflowOverlay
  412. }
  413. if iNdEx >= l {
  414. return 0, io.ErrUnexpectedEOF
  415. }
  416. b := dAtA[iNdEx]
  417. iNdEx++
  418. length |= (int(b) & 0x7F) << shift
  419. if b < 0x80 {
  420. break
  421. }
  422. }
  423. if length < 0 {
  424. return 0, ErrInvalidLengthOverlay
  425. }
  426. iNdEx += length
  427. case 3:
  428. depth++
  429. case 4:
  430. if depth == 0 {
  431. return 0, ErrUnexpectedEndOfGroupOverlay
  432. }
  433. depth--
  434. case 5:
  435. iNdEx += 4
  436. default:
  437. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  438. }
  439. if iNdEx < 0 {
  440. return 0, ErrInvalidLengthOverlay
  441. }
  442. if depth == 0 {
  443. return iNdEx, nil
  444. }
  445. }
  446. return 0, io.ErrUnexpectedEOF
  447. }
  448. var (
  449. ErrInvalidLengthOverlay = fmt.Errorf("proto: negative length found during unmarshaling")
  450. ErrIntOverflowOverlay = fmt.Errorf("proto: integer overflow")
  451. ErrUnexpectedEndOfGroupOverlay = fmt.Errorf("proto: unexpected end of group")
  452. )