github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/libnetwork/drivers/overlay/overlay.pb.go (about)

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