|
@@ -39,7 +39,8 @@ type EndpointRecord struct {
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
|
|
|
ServiceID string `protobuf:"bytes,3,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
|
|
|
- EndpointIP string `protobuf:"bytes,4,opt,name=endpoint_ip,json=endpointIp,proto3" json:"endpoint_ip,omitempty"`
|
|
|
+ VirtualIP string `protobuf:"bytes,4,opt,name=virtual_ip,json=virtualIp,proto3" json:"virtual_ip,omitempty"`
|
|
|
+ EndpointIP string `protobuf:"bytes,5,opt,name=endpoint_ip,json=endpointIp,proto3" json:"endpoint_ip,omitempty"`
|
|
|
}
|
|
|
|
|
|
func (m *EndpointRecord) Reset() { *m = EndpointRecord{} }
|
|
@@ -53,11 +54,12 @@ func (this *EndpointRecord) GoString() string {
|
|
|
if this == nil {
|
|
|
return "nil"
|
|
|
}
|
|
|
- s := make([]string, 0, 8)
|
|
|
+ s := make([]string, 0, 9)
|
|
|
s = append(s, "&libnetwork.EndpointRecord{")
|
|
|
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
|
|
|
s = append(s, "ServiceName: "+fmt.Sprintf("%#v", this.ServiceName)+",\n")
|
|
|
s = append(s, "ServiceID: "+fmt.Sprintf("%#v", this.ServiceID)+",\n")
|
|
|
+ s = append(s, "VirtualIP: "+fmt.Sprintf("%#v", this.VirtualIP)+",\n")
|
|
|
s = append(s, "EndpointIP: "+fmt.Sprintf("%#v", this.EndpointIP)+",\n")
|
|
|
s = append(s, "}")
|
|
|
return strings.Join(s, "")
|
|
@@ -120,9 +122,15 @@ func (m *EndpointRecord) MarshalTo(data []byte) (int, error) {
|
|
|
i = encodeVarintAgent(data, i, uint64(len(m.ServiceID)))
|
|
|
i += copy(data[i:], m.ServiceID)
|
|
|
}
|
|
|
- if len(m.EndpointIP) > 0 {
|
|
|
+ if len(m.VirtualIP) > 0 {
|
|
|
data[i] = 0x22
|
|
|
i++
|
|
|
+ i = encodeVarintAgent(data, i, uint64(len(m.VirtualIP)))
|
|
|
+ i += copy(data[i:], m.VirtualIP)
|
|
|
+ }
|
|
|
+ if len(m.EndpointIP) > 0 {
|
|
|
+ data[i] = 0x2a
|
|
|
+ i++
|
|
|
i = encodeVarintAgent(data, i, uint64(len(m.EndpointIP)))
|
|
|
i += copy(data[i:], m.EndpointIP)
|
|
|
}
|
|
@@ -171,6 +179,10 @@ func (m *EndpointRecord) Size() (n int) {
|
|
|
if l > 0 {
|
|
|
n += 1 + l + sovAgent(uint64(l))
|
|
|
}
|
|
|
+ l = len(m.VirtualIP)
|
|
|
+ if l > 0 {
|
|
|
+ n += 1 + l + sovAgent(uint64(l))
|
|
|
+ }
|
|
|
l = len(m.EndpointIP)
|
|
|
if l > 0 {
|
|
|
n += 1 + l + sovAgent(uint64(l))
|
|
@@ -199,6 +211,7 @@ func (this *EndpointRecord) String() string {
|
|
|
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
|
|
|
`ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
|
|
|
`ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
|
|
|
+ `VirtualIP:` + fmt.Sprintf("%v", this.VirtualIP) + `,`,
|
|
|
`EndpointIP:` + fmt.Sprintf("%v", this.EndpointIP) + `,`,
|
|
|
`}`,
|
|
|
}, "")
|
|
@@ -329,6 +342,35 @@ func (m *EndpointRecord) Unmarshal(data []byte) error {
|
|
|
m.ServiceID = string(data[iNdEx:postIndex])
|
|
|
iNdEx = postIndex
|
|
|
case 4:
|
|
|
+ if wireType != 2 {
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field VirtualIP", wireType)
|
|
|
+ }
|
|
|
+ var stringLen uint64
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowAgent
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ intStringLen := int(stringLen)
|
|
|
+ if intStringLen < 0 {
|
|
|
+ return ErrInvalidLengthAgent
|
|
|
+ }
|
|
|
+ postIndex := iNdEx + intStringLen
|
|
|
+ if postIndex > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ m.VirtualIP = string(data[iNdEx:postIndex])
|
|
|
+ iNdEx = postIndex
|
|
|
+ case 5:
|
|
|
if wireType != 2 {
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EndpointIP", wireType)
|
|
|
}
|
|
@@ -484,18 +526,20 @@ var (
|
|
|
)
|
|
|
|
|
|
var fileDescriptorAgent = []byte{
|
|
|
- // 204 bytes of a gzipped FileDescriptorProto
|
|
|
+ // 228 bytes of a gzipped FileDescriptorProto
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x4c, 0x4f, 0xcd,
|
|
|
0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xca, 0xc9, 0x4c, 0xca, 0x4b, 0x2d, 0x29,
|
|
|
0xcf, 0x2f, 0xca, 0x96, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x0b, 0xeb, 0x83, 0x58, 0x10, 0x15,
|
|
|
- 0x4a, 0xcb, 0x18, 0xb9, 0xf8, 0x5c, 0xf3, 0x52, 0x0a, 0xf2, 0x33, 0xf3, 0x4a, 0x82, 0x52, 0x93,
|
|
|
+ 0x4a, 0x57, 0x18, 0xb9, 0xf8, 0x5c, 0xf3, 0x52, 0x0a, 0xf2, 0x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