github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/libnetwork/agent.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: agent.proto 3 4 /* 5 Package libnetwork is a generated protocol buffer package. 6 7 It is generated from these files: 8 agent.proto 9 10 It has these top-level messages: 11 EndpointRecord 12 PortConfig 13 */ 14 package libnetwork 15 16 import proto "github.com/gogo/protobuf/proto" 17 import fmt "fmt" 18 import math "math" 19 import _ "github.com/gogo/protobuf/gogoproto" 20 21 import strings "strings" 22 import reflect "reflect" 23 24 import io "io" 25 26 // Reference imports to suppress errors if they are not otherwise used. 27 var _ = proto.Marshal 28 var _ = fmt.Errorf 29 var _ = math.Inf 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 36 37 type PortConfig_Protocol int32 38 39 const ( 40 ProtocolTCP PortConfig_Protocol = 0 41 ProtocolUDP PortConfig_Protocol = 1 42 ProtocolSCTP PortConfig_Protocol = 2 43 ) 44 45 var PortConfig_Protocol_name = map[int32]string{ 46 0: "TCP", 47 1: "UDP", 48 2: "SCTP", 49 } 50 var PortConfig_Protocol_value = map[string]int32{ 51 "TCP": 0, 52 "UDP": 1, 53 "SCTP": 2, 54 } 55 56 func (x PortConfig_Protocol) String() string { 57 return proto.EnumName(PortConfig_Protocol_name, int32(x)) 58 } 59 func (PortConfig_Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 0} } 60 61 // EndpointRecord specifies all the endpoint specific information that 62 // needs to gossiped to nodes participating in the network. 63 type EndpointRecord struct { 64 // Name of the container 65 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 66 // Service name of the service to which this endpoint belongs. 67 ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` 68 // Service ID of the service to which this endpoint belongs. 69 ServiceID string `protobuf:"bytes,3,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` 70 // Virtual IP of the service to which this endpoint belongs. 71 VirtualIP string `protobuf:"bytes,4,opt,name=virtual_ip,json=virtualIp,proto3" json:"virtual_ip,omitempty"` 72 // IP assigned to this endpoint. 73 EndpointIP string `protobuf:"bytes,5,opt,name=endpoint_ip,json=endpointIp,proto3" json:"endpoint_ip,omitempty"` 74 // IngressPorts exposed by the service to which this endpoint belongs. 75 IngressPorts []*PortConfig `protobuf:"bytes,6,rep,name=ingress_ports,json=ingressPorts" json:"ingress_ports,omitempty"` 76 // A list of aliases which are alternate names for the service 77 Aliases []string `protobuf:"bytes,7,rep,name=aliases" json:"aliases,omitempty"` 78 // List of aliases task specific aliases 79 TaskAliases []string `protobuf:"bytes,8,rep,name=task_aliases,json=taskAliases" json:"task_aliases,omitempty"` 80 // Whether this enpoint's service has been disabled 81 ServiceDisabled bool `protobuf:"varint,9,opt,name=service_disabled,json=serviceDisabled,proto3" json:"service_disabled,omitempty"` 82 } 83 84 func (m *EndpointRecord) Reset() { *m = EndpointRecord{} } 85 func (*EndpointRecord) ProtoMessage() {} 86 func (*EndpointRecord) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0} } 87 88 func (m *EndpointRecord) GetName() string { 89 if m != nil { 90 return m.Name 91 } 92 return "" 93 } 94 95 func (m *EndpointRecord) GetServiceName() string { 96 if m != nil { 97 return m.ServiceName 98 } 99 return "" 100 } 101 102 func (m *EndpointRecord) GetServiceID() string { 103 if m != nil { 104 return m.ServiceID 105 } 106 return "" 107 } 108 109 func (m *EndpointRecord) GetVirtualIP() string { 110 if m != nil { 111 return m.VirtualIP 112 } 113 return "" 114 } 115 116 func (m *EndpointRecord) GetEndpointIP() string { 117 if m != nil { 118 return m.EndpointIP 119 } 120 return "" 121 } 122 123 func (m *EndpointRecord) GetIngressPorts() []*PortConfig { 124 if m != nil { 125 return m.IngressPorts 126 } 127 return nil 128 } 129 130 func (m *EndpointRecord) GetAliases() []string { 131 if m != nil { 132 return m.Aliases 133 } 134 return nil 135 } 136 137 func (m *EndpointRecord) GetTaskAliases() []string { 138 if m != nil { 139 return m.TaskAliases 140 } 141 return nil 142 } 143 144 func (m *EndpointRecord) GetServiceDisabled() bool { 145 if m != nil { 146 return m.ServiceDisabled 147 } 148 return false 149 } 150 151 // PortConfig specifies an exposed port which can be 152 // addressed using the given name. This can be later queried 153 // using a service discovery api or a DNS SRV query. The node 154 // port specifies a port that can be used to address this 155 // service external to the cluster by sending a connection 156 // request to this port to any node on the cluster. 157 type PortConfig struct { 158 // Name for the port. If provided the port information can 159 // be queried using the name as in a DNS SRV query. 160 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 161 // Protocol for the port which is exposed. 162 Protocol PortConfig_Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=libnetwork.PortConfig_Protocol" json:"protocol,omitempty"` 163 // The port which the application is exposing and is bound to. 164 TargetPort uint32 `protobuf:"varint,3,opt,name=target_port,json=targetPort,proto3" json:"target_port,omitempty"` 165 // PublishedPort specifies the port on which the service is 166 // exposed on all nodes on the cluster. If not specified an 167 // arbitrary port in the node port range is allocated by the 168 // system. If specified it should be within the node port 169 // range and it should be available. 170 PublishedPort uint32 `protobuf:"varint,4,opt,name=published_port,json=publishedPort,proto3" json:"published_port,omitempty"` 171 } 172 173 func (m *PortConfig) Reset() { *m = PortConfig{} } 174 func (*PortConfig) ProtoMessage() {} 175 func (*PortConfig) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1} } 176 177 func (m *PortConfig) GetName() string { 178 if m != nil { 179 return m.Name 180 } 181 return "" 182 } 183 184 func (m *PortConfig) GetProtocol() PortConfig_Protocol { 185 if m != nil { 186 return m.Protocol 187 } 188 return ProtocolTCP 189 } 190 191 func (m *PortConfig) GetTargetPort() uint32 { 192 if m != nil { 193 return m.TargetPort 194 } 195 return 0 196 } 197 198 func (m *PortConfig) GetPublishedPort() uint32 { 199 if m != nil { 200 return m.PublishedPort 201 } 202 return 0 203 } 204 205 func init() { 206 proto.RegisterType((*EndpointRecord)(nil), "libnetwork.EndpointRecord") 207 proto.RegisterType((*PortConfig)(nil), "libnetwork.PortConfig") 208 proto.RegisterEnum("libnetwork.PortConfig_Protocol", PortConfig_Protocol_name, PortConfig_Protocol_value) 209 } 210 func (this *EndpointRecord) GoString() string { 211 if this == nil { 212 return "nil" 213 } 214 s := make([]string, 0, 13) 215 s = append(s, "&libnetwork.EndpointRecord{") 216 s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") 217 s = append(s, "ServiceName: "+fmt.Sprintf("%#v", this.ServiceName)+",\n") 218 s = append(s, "ServiceID: "+fmt.Sprintf("%#v", this.ServiceID)+",\n") 219 s = append(s, "VirtualIP: "+fmt.Sprintf("%#v", this.VirtualIP)+",\n") 220 s = append(s, "EndpointIP: "+fmt.Sprintf("%#v", this.EndpointIP)+",\n") 221 if this.IngressPorts != nil { 222 s = append(s, "IngressPorts: "+fmt.Sprintf("%#v", this.IngressPorts)+",\n") 223 } 224 s = append(s, "Aliases: "+fmt.Sprintf("%#v", this.Aliases)+",\n") 225 s = append(s, "TaskAliases: "+fmt.Sprintf("%#v", this.TaskAliases)+",\n") 226 s = append(s, "ServiceDisabled: "+fmt.Sprintf("%#v", this.ServiceDisabled)+",\n") 227 s = append(s, "}") 228 return strings.Join(s, "") 229 } 230 func (this *PortConfig) GoString() string { 231 if this == nil { 232 return "nil" 233 } 234 s := make([]string, 0, 8) 235 s = append(s, "&libnetwork.PortConfig{") 236 s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") 237 s = append(s, "Protocol: "+fmt.Sprintf("%#v", this.Protocol)+",\n") 238 s = append(s, "TargetPort: "+fmt.Sprintf("%#v", this.TargetPort)+",\n") 239 s = append(s, "PublishedPort: "+fmt.Sprintf("%#v", this.PublishedPort)+",\n") 240 s = append(s, "}") 241 return strings.Join(s, "") 242 } 243 func valueToGoStringAgent(v interface{}, typ string) string { 244 rv := reflect.ValueOf(v) 245 if rv.IsNil() { 246 return "nil" 247 } 248 pv := reflect.Indirect(rv).Interface() 249 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 250 } 251 func (m *EndpointRecord) Marshal() (dAtA []byte, err error) { 252 size := m.Size() 253 dAtA = make([]byte, size) 254 n, err := m.MarshalTo(dAtA) 255 if err != nil { 256 return nil, err 257 } 258 return dAtA[:n], nil 259 } 260 261 func (m *EndpointRecord) MarshalTo(dAtA []byte) (int, error) { 262 var i int 263 _ = i 264 var l int 265 _ = l 266 if len(m.Name) > 0 { 267 dAtA[i] = 0xa 268 i++ 269 i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) 270 i += copy(dAtA[i:], m.Name) 271 } 272 if len(m.ServiceName) > 0 { 273 dAtA[i] = 0x12 274 i++ 275 i = encodeVarintAgent(dAtA, i, uint64(len(m.ServiceName))) 276 i += copy(dAtA[i:], m.ServiceName) 277 } 278 if len(m.ServiceID) > 0 { 279 dAtA[i] = 0x1a 280 i++ 281 i = encodeVarintAgent(dAtA, i, uint64(len(m.ServiceID))) 282 i += copy(dAtA[i:], m.ServiceID) 283 } 284 if len(m.VirtualIP) > 0 { 285 dAtA[i] = 0x22 286 i++ 287 i = encodeVarintAgent(dAtA, i, uint64(len(m.VirtualIP))) 288 i += copy(dAtA[i:], m.VirtualIP) 289 } 290 if len(m.EndpointIP) > 0 { 291 dAtA[i] = 0x2a 292 i++ 293 i = encodeVarintAgent(dAtA, i, uint64(len(m.EndpointIP))) 294 i += copy(dAtA[i:], m.EndpointIP) 295 } 296 if len(m.IngressPorts) > 0 { 297 for _, msg := range m.IngressPorts { 298 dAtA[i] = 0x32 299 i++ 300 i = encodeVarintAgent(dAtA, i, uint64(msg.Size())) 301 n, err := msg.MarshalTo(dAtA[i:]) 302 if err != nil { 303 return 0, err 304 } 305 i += n 306 } 307 } 308 if len(m.Aliases) > 0 { 309 for _, s := range m.Aliases { 310 dAtA[i] = 0x3a 311 i++ 312 l = len(s) 313 for l >= 1<<7 { 314 dAtA[i] = uint8(uint64(l)&0x7f | 0x80) 315 l >>= 7 316 i++ 317 } 318 dAtA[i] = uint8(l) 319 i++ 320 i += copy(dAtA[i:], s) 321 } 322 } 323 if len(m.TaskAliases) > 0 { 324 for _, s := range m.TaskAliases { 325 dAtA[i] = 0x42 326 i++ 327 l = len(s) 328 for l >= 1<<7 { 329 dAtA[i] = uint8(uint64(l)&0x7f | 0x80) 330 l >>= 7 331 i++ 332 } 333 dAtA[i] = uint8(l) 334 i++ 335 i += copy(dAtA[i:], s) 336 } 337 } 338 if m.ServiceDisabled { 339 dAtA[i] = 0x48 340 i++ 341 if m.ServiceDisabled { 342 dAtA[i] = 1 343 } else { 344 dAtA[i] = 0 345 } 346 i++ 347 } 348 return i, nil 349 } 350 351 func (m *PortConfig) Marshal() (dAtA []byte, err error) { 352 size := m.Size() 353 dAtA = make([]byte, size) 354 n, err := m.MarshalTo(dAtA) 355 if err != nil { 356 return nil, err 357 } 358 return dAtA[:n], nil 359 } 360 361 func (m *PortConfig) MarshalTo(dAtA []byte) (int, error) { 362 var i int 363 _ = i 364 var l int 365 _ = l 366 if len(m.Name) > 0 { 367 dAtA[i] = 0xa 368 i++ 369 i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) 370 i += copy(dAtA[i:], m.Name) 371 } 372 if m.Protocol != 0 { 373 dAtA[i] = 0x10 374 i++ 375 i = encodeVarintAgent(dAtA, i, uint64(m.Protocol)) 376 } 377 if m.TargetPort != 0 { 378 dAtA[i] = 0x18 379 i++ 380 i = encodeVarintAgent(dAtA, i, uint64(m.TargetPort)) 381 } 382 if m.PublishedPort != 0 { 383 dAtA[i] = 0x20 384 i++ 385 i = encodeVarintAgent(dAtA, i, uint64(m.PublishedPort)) 386 } 387 return i, nil 388 } 389 390 func encodeVarintAgent(dAtA []byte, offset int, v uint64) int { 391 for v >= 1<<7 { 392 dAtA[offset] = uint8(v&0x7f | 0x80) 393 v >>= 7 394 offset++ 395 } 396 dAtA[offset] = uint8(v) 397 return offset + 1 398 } 399 func (m *EndpointRecord) Size() (n int) { 400 var l int 401 _ = l 402 l = len(m.Name) 403 if l > 0 { 404 n += 1 + l + sovAgent(uint64(l)) 405 } 406 l = len(m.ServiceName) 407 if l > 0 { 408 n += 1 + l + sovAgent(uint64(l)) 409 } 410 l = len(m.ServiceID) 411 if l > 0 { 412 n += 1 + l + sovAgent(uint64(l)) 413 } 414 l = len(m.VirtualIP) 415 if l > 0 { 416 n += 1 + l + sovAgent(uint64(l)) 417 } 418 l = len(m.EndpointIP) 419 if l > 0 { 420 n += 1 + l + sovAgent(uint64(l)) 421 } 422 if len(m.IngressPorts) > 0 { 423 for _, e := range m.IngressPorts { 424 l = e.Size() 425 n += 1 + l + sovAgent(uint64(l)) 426 } 427 } 428 if len(m.Aliases) > 0 { 429 for _, s := range m.Aliases { 430 l = len(s) 431 n += 1 + l + sovAgent(uint64(l)) 432 } 433 } 434 if len(m.TaskAliases) > 0 { 435 for _, s := range m.TaskAliases { 436 l = len(s) 437 n += 1 + l + sovAgent(uint64(l)) 438 } 439 } 440 if m.ServiceDisabled { 441 n += 2 442 } 443 return n 444 } 445 446 func (m *PortConfig) Size() (n int) { 447 var l int 448 _ = l 449 l = len(m.Name) 450 if l > 0 { 451 n += 1 + l + sovAgent(uint64(l)) 452 } 453 if m.Protocol != 0 { 454 n += 1 + sovAgent(uint64(m.Protocol)) 455 } 456 if m.TargetPort != 0 { 457 n += 1 + sovAgent(uint64(m.TargetPort)) 458 } 459 if m.PublishedPort != 0 { 460 n += 1 + sovAgent(uint64(m.PublishedPort)) 461 } 462 return n 463 } 464 465 func sovAgent(x uint64) (n int) { 466 for { 467 n++ 468 x >>= 7 469 if x == 0 { 470 break 471 } 472 } 473 return n 474 } 475 func sozAgent(x uint64) (n int) { 476 return sovAgent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 477 } 478 func (this *EndpointRecord) String() string { 479 if this == nil { 480 return "nil" 481 } 482 s := strings.Join([]string{`&EndpointRecord{`, 483 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 484 `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, 485 `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`, 486 `VirtualIP:` + fmt.Sprintf("%v", this.VirtualIP) + `,`, 487 `EndpointIP:` + fmt.Sprintf("%v", this.EndpointIP) + `,`, 488 `IngressPorts:` + strings.Replace(fmt.Sprintf("%v", this.IngressPorts), "PortConfig", "PortConfig", 1) + `,`, 489 `Aliases:` + fmt.Sprintf("%v", this.Aliases) + `,`, 490 `TaskAliases:` + fmt.Sprintf("%v", this.TaskAliases) + `,`, 491 `ServiceDisabled:` + fmt.Sprintf("%v", this.ServiceDisabled) + `,`, 492 `}`, 493 }, "") 494 return s 495 } 496 func (this *PortConfig) String() string { 497 if this == nil { 498 return "nil" 499 } 500 s := strings.Join([]string{`&PortConfig{`, 501 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 502 `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, 503 `TargetPort:` + fmt.Sprintf("%v", this.TargetPort) + `,`, 504 `PublishedPort:` + fmt.Sprintf("%v", this.PublishedPort) + `,`, 505 `}`, 506 }, "") 507 return s 508 } 509 func valueToStringAgent(v interface{}) string { 510 rv := reflect.ValueOf(v) 511 if rv.IsNil() { 512 return "nil" 513 } 514 pv := reflect.Indirect(rv).Interface() 515 return fmt.Sprintf("*%v", pv) 516 } 517 func (m *EndpointRecord) Unmarshal(dAtA []byte) error { 518 l := len(dAtA) 519 iNdEx := 0 520 for iNdEx < l { 521 preIndex := iNdEx 522 var wire uint64 523 for shift := uint(0); ; shift += 7 { 524 if shift >= 64 { 525 return ErrIntOverflowAgent 526 } 527 if iNdEx >= l { 528 return io.ErrUnexpectedEOF 529 } 530 b := dAtA[iNdEx] 531 iNdEx++ 532 wire |= (uint64(b) & 0x7F) << shift 533 if b < 0x80 { 534 break 535 } 536 } 537 fieldNum := int32(wire >> 3) 538 wireType := int(wire & 0x7) 539 if wireType == 4 { 540 return fmt.Errorf("proto: EndpointRecord: wiretype end group for non-group") 541 } 542 if fieldNum <= 0 { 543 return fmt.Errorf("proto: EndpointRecord: illegal tag %d (wire type %d)", fieldNum, wire) 544 } 545 switch fieldNum { 546 case 1: 547 if wireType != 2 { 548 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 549 } 550 var stringLen uint64 551 for shift := uint(0); ; shift += 7 { 552 if shift >= 64 { 553 return ErrIntOverflowAgent 554 } 555 if iNdEx >= l { 556 return io.ErrUnexpectedEOF 557 } 558 b := dAtA[iNdEx] 559 iNdEx++ 560 stringLen |= (uint64(b) & 0x7F) << shift 561 if b < 0x80 { 562 break 563 } 564 } 565 intStringLen := int(stringLen) 566 if intStringLen < 0 { 567 return ErrInvalidLengthAgent 568 } 569 postIndex := iNdEx + intStringLen 570 if postIndex > l { 571 return io.ErrUnexpectedEOF 572 } 573 m.Name = string(dAtA[iNdEx:postIndex]) 574 iNdEx = postIndex 575 case 2: 576 if wireType != 2 { 577 return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) 578 } 579 var stringLen uint64 580 for shift := uint(0); ; shift += 7 { 581 if shift >= 64 { 582 return ErrIntOverflowAgent 583 } 584 if iNdEx >= l { 585 return io.ErrUnexpectedEOF 586 } 587 b := dAtA[iNdEx] 588 iNdEx++ 589 stringLen |= (uint64(b) & 0x7F) << shift 590 if b < 0x80 { 591 break 592 } 593 } 594 intStringLen := int(stringLen) 595 if intStringLen < 0 { 596 return ErrInvalidLengthAgent 597 } 598 postIndex := iNdEx + intStringLen 599 if postIndex > l { 600 return io.ErrUnexpectedEOF 601 } 602 m.ServiceName = string(dAtA[iNdEx:postIndex]) 603 iNdEx = postIndex 604 case 3: 605 if wireType != 2 { 606 return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType) 607 } 608 var stringLen uint64 609 for shift := uint(0); ; shift += 7 { 610 if shift >= 64 { 611 return ErrIntOverflowAgent 612 } 613 if iNdEx >= l { 614 return io.ErrUnexpectedEOF 615 } 616 b := dAtA[iNdEx] 617 iNdEx++ 618 stringLen |= (uint64(b) & 0x7F) << shift 619 if b < 0x80 { 620 break 621 } 622 } 623 intStringLen := int(stringLen) 624 if intStringLen < 0 { 625 return ErrInvalidLengthAgent 626 } 627 postIndex := iNdEx + intStringLen 628 if postIndex > l { 629 return io.ErrUnexpectedEOF 630 } 631 m.ServiceID = string(dAtA[iNdEx:postIndex]) 632 iNdEx = postIndex 633 case 4: 634 if wireType != 2 { 635 return fmt.Errorf("proto: wrong wireType = %d for field VirtualIP", wireType) 636 } 637 var stringLen uint64 638 for shift := uint(0); ; shift += 7 { 639 if shift >= 64 { 640 return ErrIntOverflowAgent 641 } 642 if iNdEx >= l { 643 return io.ErrUnexpectedEOF 644 } 645 b := dAtA[iNdEx] 646 iNdEx++ 647 stringLen |= (uint64(b) & 0x7F) << shift 648 if b < 0x80 { 649 break 650 } 651 } 652 intStringLen := int(stringLen) 653 if intStringLen < 0 { 654 return ErrInvalidLengthAgent 655 } 656 postIndex := iNdEx + intStringLen 657 if postIndex > l { 658 return io.ErrUnexpectedEOF 659 } 660 m.VirtualIP = string(dAtA[iNdEx:postIndex]) 661 iNdEx = postIndex 662 case 5: 663 if wireType != 2 { 664 return fmt.Errorf("proto: wrong wireType = %d for field EndpointIP", wireType) 665 } 666 var stringLen uint64 667 for shift := uint(0); ; shift += 7 { 668 if shift >= 64 { 669 return ErrIntOverflowAgent 670 } 671 if iNdEx >= l { 672 return io.ErrUnexpectedEOF 673 } 674 b := dAtA[iNdEx] 675 iNdEx++ 676 stringLen |= (uint64(b) & 0x7F) << shift 677 if b < 0x80 { 678 break 679 } 680 } 681 intStringLen := int(stringLen) 682 if intStringLen < 0 { 683 return ErrInvalidLengthAgent 684 } 685 postIndex := iNdEx + intStringLen 686 if postIndex > l { 687 return io.ErrUnexpectedEOF 688 } 689 m.EndpointIP = string(dAtA[iNdEx:postIndex]) 690 iNdEx = postIndex 691 case 6: 692 if wireType != 2 { 693 return fmt.Errorf("proto: wrong wireType = %d for field IngressPorts", wireType) 694 } 695 var msglen int 696 for shift := uint(0); ; shift += 7 { 697 if shift >= 64 { 698 return ErrIntOverflowAgent 699 } 700 if iNdEx >= l { 701 return io.ErrUnexpectedEOF 702 } 703 b := dAtA[iNdEx] 704 iNdEx++ 705 msglen |= (int(b) & 0x7F) << shift 706 if b < 0x80 { 707 break 708 } 709 } 710 if msglen < 0 { 711 return ErrInvalidLengthAgent 712 } 713 postIndex := iNdEx + msglen 714 if postIndex > l { 715 return io.ErrUnexpectedEOF 716 } 717 m.IngressPorts = append(m.IngressPorts, &PortConfig{}) 718 if err := m.IngressPorts[len(m.IngressPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 719 return err 720 } 721 iNdEx = postIndex 722 case 7: 723 if wireType != 2 { 724 return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) 725 } 726 var stringLen uint64 727 for shift := uint(0); ; shift += 7 { 728 if shift >= 64 { 729 return ErrIntOverflowAgent 730 } 731 if iNdEx >= l { 732 return io.ErrUnexpectedEOF 733 } 734 b := dAtA[iNdEx] 735 iNdEx++ 736 stringLen |= (uint64(b) & 0x7F) << shift 737 if b < 0x80 { 738 break 739 } 740 } 741 intStringLen := int(stringLen) 742 if intStringLen < 0 { 743 return ErrInvalidLengthAgent 744 } 745 postIndex := iNdEx + intStringLen 746 if postIndex > l { 747 return io.ErrUnexpectedEOF 748 } 749 m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex])) 750 iNdEx = postIndex 751 case 8: 752 if wireType != 2 { 753 return fmt.Errorf("proto: wrong wireType = %d for field TaskAliases", wireType) 754 } 755 var stringLen uint64 756 for shift := uint(0); ; shift += 7 { 757 if shift >= 64 { 758 return ErrIntOverflowAgent 759 } 760 if iNdEx >= l { 761 return io.ErrUnexpectedEOF 762 } 763 b := dAtA[iNdEx] 764 iNdEx++ 765 stringLen |= (uint64(b) & 0x7F) << shift 766 if b < 0x80 { 767 break 768 } 769 } 770 intStringLen := int(stringLen) 771 if intStringLen < 0 { 772 return ErrInvalidLengthAgent 773 } 774 postIndex := iNdEx + intStringLen 775 if postIndex > l { 776 return io.ErrUnexpectedEOF 777 } 778 m.TaskAliases = append(m.TaskAliases, string(dAtA[iNdEx:postIndex])) 779 iNdEx = postIndex 780 case 9: 781 if wireType != 0 { 782 return fmt.Errorf("proto: wrong wireType = %d for field ServiceDisabled", wireType) 783 } 784 var v int 785 for shift := uint(0); ; shift += 7 { 786 if shift >= 64 { 787 return ErrIntOverflowAgent 788 } 789 if iNdEx >= l { 790 return io.ErrUnexpectedEOF 791 } 792 b := dAtA[iNdEx] 793 iNdEx++ 794 v |= (int(b) & 0x7F) << shift 795 if b < 0x80 { 796 break 797 } 798 } 799 m.ServiceDisabled = bool(v != 0) 800 default: 801 iNdEx = preIndex 802 skippy, err := skipAgent(dAtA[iNdEx:]) 803 if err != nil { 804 return err 805 } 806 if skippy < 0 { 807 return ErrInvalidLengthAgent 808 } 809 if (iNdEx + skippy) > l { 810 return io.ErrUnexpectedEOF 811 } 812 iNdEx += skippy 813 } 814 } 815 816 if iNdEx > l { 817 return io.ErrUnexpectedEOF 818 } 819 return nil 820 } 821 func (m *PortConfig) Unmarshal(dAtA []byte) error { 822 l := len(dAtA) 823 iNdEx := 0 824 for iNdEx < l { 825 preIndex := iNdEx 826 var wire uint64 827 for shift := uint(0); ; shift += 7 { 828 if shift >= 64 { 829 return ErrIntOverflowAgent 830 } 831 if iNdEx >= l { 832 return io.ErrUnexpectedEOF 833 } 834 b := dAtA[iNdEx] 835 iNdEx++ 836 wire |= (uint64(b) & 0x7F) << shift 837 if b < 0x80 { 838 break 839 } 840 } 841 fieldNum := int32(wire >> 3) 842 wireType := int(wire & 0x7) 843 if wireType == 4 { 844 return fmt.Errorf("proto: PortConfig: wiretype end group for non-group") 845 } 846 if fieldNum <= 0 { 847 return fmt.Errorf("proto: PortConfig: illegal tag %d (wire type %d)", fieldNum, wire) 848 } 849 switch fieldNum { 850 case 1: 851 if wireType != 2 { 852 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 853 } 854 var stringLen uint64 855 for shift := uint(0); ; shift += 7 { 856 if shift >= 64 { 857 return ErrIntOverflowAgent 858 } 859 if iNdEx >= l { 860 return io.ErrUnexpectedEOF 861 } 862 b := dAtA[iNdEx] 863 iNdEx++ 864 stringLen |= (uint64(b) & 0x7F) << shift 865 if b < 0x80 { 866 break 867 } 868 } 869 intStringLen := int(stringLen) 870 if intStringLen < 0 { 871 return ErrInvalidLengthAgent 872 } 873 postIndex := iNdEx + intStringLen 874 if postIndex > l { 875 return io.ErrUnexpectedEOF 876 } 877 m.Name = string(dAtA[iNdEx:postIndex]) 878 iNdEx = postIndex 879 case 2: 880 if wireType != 0 { 881 return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) 882 } 883 m.Protocol = 0 884 for shift := uint(0); ; shift += 7 { 885 if shift >= 64 { 886 return ErrIntOverflowAgent 887 } 888 if iNdEx >= l { 889 return io.ErrUnexpectedEOF 890 } 891 b := dAtA[iNdEx] 892 iNdEx++ 893 m.Protocol |= (PortConfig_Protocol(b) & 0x7F) << shift 894 if b < 0x80 { 895 break 896 } 897 } 898 case 3: 899 if wireType != 0 { 900 return fmt.Errorf("proto: wrong wireType = %d for field TargetPort", wireType) 901 } 902 m.TargetPort = 0 903 for shift := uint(0); ; shift += 7 { 904 if shift >= 64 { 905 return ErrIntOverflowAgent 906 } 907 if iNdEx >= l { 908 return io.ErrUnexpectedEOF 909 } 910 b := dAtA[iNdEx] 911 iNdEx++ 912 m.TargetPort |= (uint32(b) & 0x7F) << shift 913 if b < 0x80 { 914 break 915 } 916 } 917 case 4: 918 if wireType != 0 { 919 return fmt.Errorf("proto: wrong wireType = %d for field PublishedPort", wireType) 920 } 921 m.PublishedPort = 0 922 for shift := uint(0); ; shift += 7 { 923 if shift >= 64 { 924 return ErrIntOverflowAgent 925 } 926 if iNdEx >= l { 927 return io.ErrUnexpectedEOF 928 } 929 b := dAtA[iNdEx] 930 iNdEx++ 931 m.PublishedPort |= (uint32(b) & 0x7F) << shift 932 if b < 0x80 { 933 break 934 } 935 } 936 default: 937 iNdEx = preIndex 938 skippy, err := skipAgent(dAtA[iNdEx:]) 939 if err != nil { 940 return err 941 } 942 if skippy < 0 { 943 return ErrInvalidLengthAgent 944 } 945 if (iNdEx + skippy) > l { 946 return io.ErrUnexpectedEOF 947 } 948 iNdEx += skippy 949 } 950 } 951 952 if iNdEx > l { 953 return io.ErrUnexpectedEOF 954 } 955 return nil 956 } 957 func skipAgent(dAtA []byte) (n int, err error) { 958 l := len(dAtA) 959 iNdEx := 0 960 for iNdEx < l { 961 var wire uint64 962 for shift := uint(0); ; shift += 7 { 963 if shift >= 64 { 964 return 0, ErrIntOverflowAgent 965 } 966 if iNdEx >= l { 967 return 0, io.ErrUnexpectedEOF 968 } 969 b := dAtA[iNdEx] 970 iNdEx++ 971 wire |= (uint64(b) & 0x7F) << shift 972 if b < 0x80 { 973 break 974 } 975 } 976 wireType := int(wire & 0x7) 977 switch wireType { 978 case 0: 979 for shift := uint(0); ; shift += 7 { 980 if shift >= 64 { 981 return 0, ErrIntOverflowAgent 982 } 983 if iNdEx >= l { 984 return 0, io.ErrUnexpectedEOF 985 } 986 iNdEx++ 987 if dAtA[iNdEx-1] < 0x80 { 988 break 989 } 990 } 991 return iNdEx, nil 992 case 1: 993 iNdEx += 8 994 return iNdEx, nil 995 case 2: 996 var length int 997 for shift := uint(0); ; shift += 7 { 998 if shift >= 64 { 999 return 0, ErrIntOverflowAgent 1000 } 1001 if iNdEx >= l { 1002 return 0, io.ErrUnexpectedEOF 1003 } 1004 b := dAtA[iNdEx] 1005 iNdEx++ 1006 length |= (int(b) & 0x7F) << shift 1007 if b < 0x80 { 1008 break 1009 } 1010 } 1011 iNdEx += length 1012 if length < 0 { 1013 return 0, ErrInvalidLengthAgent 1014 } 1015 return iNdEx, nil 1016 case 3: 1017 for { 1018 var innerWire uint64 1019 var start int = iNdEx 1020 for shift := uint(0); ; shift += 7 { 1021 if shift >= 64 { 1022 return 0, ErrIntOverflowAgent 1023 } 1024 if iNdEx >= l { 1025 return 0, io.ErrUnexpectedEOF 1026 } 1027 b := dAtA[iNdEx] 1028 iNdEx++ 1029 innerWire |= (uint64(b) & 0x7F) << shift 1030 if b < 0x80 { 1031 break 1032 } 1033 } 1034 innerWireType := int(innerWire & 0x7) 1035 if innerWireType == 4 { 1036 break 1037 } 1038 next, err := skipAgent(dAtA[start:]) 1039 if err != nil { 1040 return 0, err 1041 } 1042 iNdEx = start + next 1043 } 1044 return iNdEx, nil 1045 case 4: 1046 return iNdEx, nil 1047 case 5: 1048 iNdEx += 4 1049 return iNdEx, nil 1050 default: 1051 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1052 } 1053 } 1054 panic("unreachable") 1055 } 1056 1057 var ( 1058 ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling") 1059 ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow") 1060 ) 1061 1062 func init() { proto.RegisterFile("agent.proto", fileDescriptorAgent) } 1063 1064 var fileDescriptorAgent = []byte{ 1065 // 459 bytes of a gzipped FileDescriptorProto 1066 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x31, 0x6f, 0xd3, 0x4c, 1067 0x18, 0xc7, 0xe3, 0xc4, 0x6f, 0x1b, 0x3f, 0x4e, 0x52, 0xeb, 0xf4, 0x0a, 0x59, 0x1e, 0x1c, 0x13, 1068 0x09, 0x29, 0x48, 0x28, 0x95, 0xca, 0xd8, 0x89, 0x26, 0x0c, 0x5e, 0x90, 0x75, 0x4d, 0x59, 0x83, 1069 0x13, 0x1f, 0xe6, 0x54, 0xe3, 0xb3, 0xee, 0xae, 0x65, 0x65, 0x03, 0xf5, 0x3b, 0x74, 0xe2, 0xcb, 1070 0x30, 0x32, 0x32, 0x55, 0xd4, 0x9f, 0x80, 0x95, 0x0d, 0xdd, 0xf9, 0xae, 0x11, 0x52, 0xb7, 0xf3, 1071 0xef, 0xff, 0x3b, 0xeb, 0xb9, 0xff, 0x03, 0x7e, 0x5e, 0x92, 0x5a, 0x2e, 0x1a, 0xce, 0x24, 0x43, 1072 0x50, 0xd1, 0x6d, 0x4d, 0xe4, 0x27, 0xc6, 0x2f, 0xa3, 0xff, 0x4b, 0x56, 0x32, 0x8d, 0x8f, 0xd5, 1073 0xa9, 0x33, 0x66, 0x7f, 0xfa, 0x30, 0x79, 0x5d, 0x17, 0x0d, 0xa3, 0xb5, 0xc4, 0x64, 0xc7, 0x78, 1074 0x81, 0x10, 0xb8, 0x75, 0xfe, 0x91, 0x84, 0x4e, 0xe2, 0xcc, 0x3d, 0xac, 0xcf, 0xe8, 0x29, 0x8c, 1075 0x04, 0xe1, 0xd7, 0x74, 0x47, 0x36, 0x3a, 0xeb, 0xeb, 0xcc, 0x37, 0xec, 0x8d, 0x52, 0x5e, 0x00, 1076 0x58, 0x85, 0x16, 0xe1, 0x40, 0x09, 0x67, 0xe3, 0xf6, 0x6e, 0xea, 0x9d, 0x77, 0x34, 0x5d, 0x61, 1077 0xcf, 0x08, 0x69, 0xa1, 0xec, 0x6b, 0xca, 0xe5, 0x55, 0x5e, 0x6d, 0x68, 0x13, 0xba, 0x7b, 0xfb, 1078 0x6d, 0x47, 0xd3, 0x0c, 0x7b, 0x46, 0x48, 0x1b, 0x74, 0x0c, 0x3e, 0x31, 0x43, 0x2a, 0xfd, 0x3f, 1079 0xad, 0x4f, 0xda, 0xbb, 0x29, 0xd8, 0xd9, 0xd3, 0x0c, 0x83, 0x55, 0xd2, 0x06, 0x9d, 0xc2, 0x98, 1080 0xd6, 0x25, 0x27, 0x42, 0x6c, 0x1a, 0xc6, 0xa5, 0x08, 0x0f, 0x92, 0xc1, 0xdc, 0x3f, 0x79, 0xb2, 1081 0xd8, 0x17, 0xb2, 0xc8, 0x18, 0x97, 0x4b, 0x56, 0xbf, 0xa7, 0x25, 0x1e, 0x19, 0x59, 0x21, 0x81, 1082 0x42, 0x38, 0xcc, 0x2b, 0x9a, 0x0b, 0x22, 0xc2, 0xc3, 0x64, 0x30, 0xf7, 0xb0, 0xfd, 0x54, 0x35, 1083 0xc8, 0x5c, 0x5c, 0x6e, 0x6c, 0x3c, 0xd4, 0xb1, 0xaf, 0xd8, 0x2b, 0xa3, 0x3c, 0x87, 0xc0, 0xd6, 1084 0x50, 0x50, 0x91, 0x6f, 0x2b, 0x52, 0x84, 0x5e, 0xe2, 0xcc, 0x87, 0xf8, 0xc8, 0xf0, 0x95, 0xc1, 1085 0xb3, 0x2f, 0x7d, 0x80, 0xfd, 0x10, 0x8f, 0xf6, 0x7e, 0x0a, 0x43, 0xbd, 0xa7, 0x1d, 0xab, 0x74, 1086 0xe7, 0x93, 0x93, 0xe9, 0xe3, 0x4f, 0x58, 0x64, 0x46, 0xc3, 0x0f, 0x17, 0xd0, 0x14, 0x7c, 0x99, 1087 0xf3, 0x92, 0x48, 0xdd, 0x81, 0x5e, 0xc9, 0x18, 0x43, 0x87, 0xd4, 0x4d, 0xf4, 0x0c, 0x26, 0xcd, 1088 0xd5, 0xb6, 0xa2, 0xe2, 0x03, 0x29, 0x3a, 0xc7, 0xd5, 0xce, 0xf8, 0x81, 0x2a, 0x6d, 0xf6, 0x0e, 1089 0x86, 0xf6, 0xef, 0x28, 0x84, 0xc1, 0x7a, 0x99, 0x05, 0xbd, 0xe8, 0xe8, 0xe6, 0x36, 0xf1, 0x2d, 1090 0x5e, 0x2f, 0x33, 0x95, 0x5c, 0xac, 0xb2, 0xc0, 0xf9, 0x37, 0xb9, 0x58, 0x65, 0x28, 0x02, 0xf7, 1091 0x7c, 0xb9, 0xce, 0x82, 0x7e, 0x14, 0xdc, 0xdc, 0x26, 0x23, 0x1b, 0x29, 0x16, 0xb9, 0x5f, 0xbf, 1092 0xc5, 0xbd, 0xb3, 0xf0, 0xe7, 0x7d, 0xdc, 0xfb, 0x7d, 0x1f, 0x3b, 0x9f, 0xdb, 0xd8, 0xf9, 0xde, 1093 0xc6, 0xce, 0x8f, 0x36, 0x76, 0x7e, 0xb5, 0xb1, 0xb3, 0x3d, 0xd0, 0xaf, 0x79, 0xf9, 0x37, 0x00, 1094 0x00, 0xff, 0xff, 0x55, 0x29, 0x75, 0x5c, 0xd7, 0x02, 0x00, 0x00, 1095 }