1 // Code generated by protoc-gen-gogo.
2 // source: overlay.proto
6 Package overlay is a generated protocol buffer package.
8 It is generated from these files:
11 It has these top-level messages:
16 import proto "github.com/gogo/protobuf/proto"
19 import _ "github.com/gogo/protobuf/gogoproto"
21 import strings "strings"
22 import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
24 import strconv "strconv"
25 import reflect "reflect"
29 // Reference imports to suppress errors if they are not otherwise used.
34 // This is a compile-time assertion to ensure that this generated file
35 // is compatible with the proto package it is being compiled against.
36 const _ = proto.GoGoProtoPackageIsVersion1
38 // PeerRecord defines the information corresponding to a peer
39 // container in the overlay network.
40 type PeerRecord struct {
41 // Endpoint IP is the IP of the container attachment on the
42 // given overlay network.
43 EndpointIP string `protobuf:"bytes,1,opt,name=endpoint_ip,json=endpointIp,proto3" json:"endpoint_ip,omitempty"`
44 // Endpoint MAC is the mac address of the container attachment
45 // on the given overlay network.
46 EndpointMAC string `protobuf:"bytes,2,opt,name=endpoint_mac,json=endpointMac,proto3" json:"endpoint_mac,omitempty"`
47 // Tunnel Endpoint IP defines the host IP for the host in
48 // which this container is running and can be reached by
49 // building a tunnel to that host IP.
50 TunnelEndpointIP string `protobuf:"bytes,3,opt,name=tunnel_endpoint_ip,json=tunnelEndpointIp,proto3" json:"tunnel_endpoint_ip,omitempty"`
53 func (m *PeerRecord) Reset() { *m = PeerRecord{} }
54 func (*PeerRecord) ProtoMessage() {}
55 func (*PeerRecord) Descriptor() ([]byte, []int) { return fileDescriptorOverlay, []int{0} }
58 proto.RegisterType((*PeerRecord)(nil), "overlay.PeerRecord")
60 func (this *PeerRecord) GoString() string {
64 s := make([]string, 0, 7)
65 s = append(s, "&overlay.PeerRecord{")
66 s = append(s, "EndpointIP: "+fmt.Sprintf("%#v", this.EndpointIP)+",\n")
67 s = append(s, "EndpointMAC: "+fmt.Sprintf("%#v", this.EndpointMAC)+",\n")
68 s = append(s, "TunnelEndpointIP: "+fmt.Sprintf("%#v", this.TunnelEndpointIP)+",\n")
70 return strings.Join(s, "")
72 func valueToGoStringOverlay(v interface{}, typ string) string {
73 rv := reflect.ValueOf(v)
77 pv := reflect.Indirect(rv).Interface()
78 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
80 func extensionToGoStringOverlay(e map[int32]github_com_gogo_protobuf_proto.Extension) string {
84 s := "map[int32]proto.Extension{"
85 keys := make([]int, 0, len(e))
87 keys = append(keys, int(k))
91 for _, k := range keys {
92 ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
94 s += strings.Join(ss, ",") + "}"
97 func (m *PeerRecord) Marshal() (data []byte, err error) {
99 data = make([]byte, size)
100 n, err := m.MarshalTo(data)
107 func (m *PeerRecord) MarshalTo(data []byte) (int, error) {
112 if len(m.EndpointIP) > 0 {
115 i = encodeVarintOverlay(data, i, uint64(len(m.EndpointIP)))
116 i += copy(data[i:], m.EndpointIP)
118 if len(m.EndpointMAC) > 0 {
121 i = encodeVarintOverlay(data, i, uint64(len(m.EndpointMAC)))
122 i += copy(data[i:], m.EndpointMAC)
124 if len(m.TunnelEndpointIP) > 0 {
127 i = encodeVarintOverlay(data, i, uint64(len(m.TunnelEndpointIP)))
128 i += copy(data[i:], m.TunnelEndpointIP)
133 func encodeFixed64Overlay(data []byte, offset int, v uint64) int {
134 data[offset] = uint8(v)
135 data[offset+1] = uint8(v >> 8)
136 data[offset+2] = uint8(v >> 16)
137 data[offset+3] = uint8(v >> 24)
138 data[offset+4] = uint8(v >> 32)
139 data[offset+5] = uint8(v >> 40)
140 data[offset+6] = uint8(v >> 48)
141 data[offset+7] = uint8(v >> 56)
144 func encodeFixed32Overlay(data []byte, offset int, v uint32) int {
145 data[offset] = uint8(v)
146 data[offset+1] = uint8(v >> 8)
147 data[offset+2] = uint8(v >> 16)
148 data[offset+3] = uint8(v >> 24)
151 func encodeVarintOverlay(data []byte, offset int, v uint64) int {
153 data[offset] = uint8(v&0x7f | 0x80)
157 data[offset] = uint8(v)
160 func (m *PeerRecord) Size() (n int) {
163 l = len(m.EndpointIP)
165 n += 1 + l + sovOverlay(uint64(l))
167 l = len(m.EndpointMAC)
169 n += 1 + l + sovOverlay(uint64(l))
171 l = len(m.TunnelEndpointIP)
173 n += 1 + l + sovOverlay(uint64(l))
178 func sovOverlay(x uint64) (n int) {
188 func sozOverlay(x uint64) (n int) {
189 return sovOverlay(uint64((x << 1) ^ uint64((int64(x) >> 63))))
191 func (this *PeerRecord) String() string {
195 s := strings.Join([]string{`&PeerRecord{`,
196 `EndpointIP:` + fmt.Sprintf("%v", this.EndpointIP) + `,`,
197 `EndpointMAC:` + fmt.Sprintf("%v", this.EndpointMAC) + `,`,
198 `TunnelEndpointIP:` + fmt.Sprintf("%v", this.TunnelEndpointIP) + `,`,
203 func valueToStringOverlay(v interface{}) string {
204 rv := reflect.ValueOf(v)
208 pv := reflect.Indirect(rv).Interface()
209 return fmt.Sprintf("*%v", pv)
211 func (m *PeerRecord) Unmarshal(data []byte) error {
217 for shift := uint(0); ; shift += 7 {
219 return ErrIntOverflowOverlay
222 return io.ErrUnexpectedEOF
226 wire |= (uint64(b) & 0x7F) << shift
231 fieldNum := int32(wire >> 3)
232 wireType := int(wire & 0x7)
234 return fmt.Errorf("proto: PeerRecord: wiretype end group for non-group")
237 return fmt.Errorf("proto: PeerRecord: illegal tag %d (wire type %d)", fieldNum, wire)
242 return fmt.Errorf("proto: wrong wireType = %d for field EndpointIP", wireType)
245 for shift := uint(0); ; shift += 7 {
247 return ErrIntOverflowOverlay
250 return io.ErrUnexpectedEOF
254 stringLen |= (uint64(b) & 0x7F) << shift
259 intStringLen := int(stringLen)
260 if intStringLen < 0 {
261 return ErrInvalidLengthOverlay
263 postIndex := iNdEx + intStringLen
265 return io.ErrUnexpectedEOF
267 m.EndpointIP = string(data[iNdEx:postIndex])
271 return fmt.Errorf("proto: wrong wireType = %d for field EndpointMAC", wireType)
274 for shift := uint(0); ; shift += 7 {
276 return ErrIntOverflowOverlay
279 return io.ErrUnexpectedEOF
283 stringLen |= (uint64(b) & 0x7F) << shift
288 intStringLen := int(stringLen)
289 if intStringLen < 0 {
290 return ErrInvalidLengthOverlay
292 postIndex := iNdEx + intStringLen
294 return io.ErrUnexpectedEOF
296 m.EndpointMAC = string(data[iNdEx:postIndex])
300 return fmt.Errorf("proto: wrong wireType = %d for field TunnelEndpointIP", wireType)
303 for shift := uint(0); ; shift += 7 {
305 return ErrIntOverflowOverlay
308 return io.ErrUnexpectedEOF
312 stringLen |= (uint64(b) & 0x7F) << shift
317 intStringLen := int(stringLen)
318 if intStringLen < 0 {
319 return ErrInvalidLengthOverlay
321 postIndex := iNdEx + intStringLen
323 return io.ErrUnexpectedEOF
325 m.TunnelEndpointIP = string(data[iNdEx:postIndex])
329 skippy, err := skipOverlay(data[iNdEx:])
334 return ErrInvalidLengthOverlay
336 if (iNdEx + skippy) > l {
337 return io.ErrUnexpectedEOF
344 return io.ErrUnexpectedEOF
348 func skipOverlay(data []byte) (n int, err error) {
353 for shift := uint(0); ; shift += 7 {
355 return 0, ErrIntOverflowOverlay
358 return 0, io.ErrUnexpectedEOF
362 wire |= (uint64(b) & 0x7F) << shift
367 wireType := int(wire & 0x7)
370 for shift := uint(0); ; shift += 7 {
372 return 0, ErrIntOverflowOverlay
375 return 0, io.ErrUnexpectedEOF
378 if data[iNdEx-1] < 0x80 {
388 for shift := uint(0); ; shift += 7 {
390 return 0, ErrIntOverflowOverlay
393 return 0, io.ErrUnexpectedEOF
397 length |= (int(b) & 0x7F) << shift
404 return 0, ErrInvalidLengthOverlay
410 var start int = iNdEx
411 for shift := uint(0); ; shift += 7 {
413 return 0, ErrIntOverflowOverlay
416 return 0, io.ErrUnexpectedEOF
420 innerWire |= (uint64(b) & 0x7F) << shift
425 innerWireType := int(innerWire & 0x7)
426 if innerWireType == 4 {
429 next, err := skipOverlay(data[start:])
442 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
449 ErrInvalidLengthOverlay = fmt.Errorf("proto: negative length found during unmarshaling")
450 ErrIntOverflowOverlay = fmt.Errorf("proto: integer overflow")
453 var fileDescriptorOverlay = []byte{
454 // 195 bytes of a gzipped FileDescriptorProto
455 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2f, 0x4b, 0x2d,
456 0xca, 0x49, 0xac, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x44, 0xd2,
457 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x69, 0x2b, 0x23, 0x17, 0x57, 0x40,
458 0x6a, 0x6a, 0x51, 0x50, 0x6a, 0x72, 0x7e, 0x51, 0x8a, 0x90, 0x3e, 0x17, 0x77, 0x6a, 0x5e, 0x4a,
459 0x41, 0x7e, 0x66, 0x5e, 0x49, 0x7c, 0x66, 0x81, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x13, 0xdf,
460 0xa3, 0x7b, 0xf2, 0x5c, 0xae, 0x50, 0x61, 0xcf, 0x80, 0x20, 0x2e, 0x98, 0x12, 0xcf, 0x02, 0x21,
461 0x23, 0x2e, 0x1e, 0xb8, 0x86, 0xdc, 0xc4, 0x64, 0x09, 0x26, 0xb0, 0x0e, 0x7e, 0xa0, 0x0e, 0x6e,
462 0x98, 0x0e, 0x5f, 0x47, 0xe7, 0x20, 0xb8, 0xa9, 0xbe, 0x89, 0xc9, 0x42, 0x4e, 0x5c, 0x42, 0x25,
463 0xa5, 0x79, 0x79, 0xa9, 0x39, 0xf1, 0xc8, 0x76, 0x31, 0x83, 0x75, 0x8a, 0x00, 0x75, 0x0a, 0x84,
464 0x80, 0x65, 0x91, 0x6c, 0x14, 0x28, 0x41, 0x15, 0x29, 0x70, 0x92, 0xb8, 0xf1, 0x50, 0x8e, 0xe1,
465 0xc3, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0xe2,
466 0x24, 0x36, 0xb0, 0xc7, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbf, 0xd7, 0x7d, 0x7d, 0x08,