agent.pb.go 26 KB

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