1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: envoy/api/v2/lds.proto 3 4package v2 5 6import proto "github.com/gogo/protobuf/proto" 7import fmt "fmt" 8import math "math" 9import core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" 10import listener "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener" 11import _ "github.com/gogo/googleapis/google/api" 12import _ "github.com/gogo/protobuf/gogoproto" 13import types "github.com/gogo/protobuf/types" 14import _ "github.com/lyft/protoc-gen-validate/validate" 15 16import bytes "bytes" 17 18import context "golang.org/x/net/context" 19import grpc "google.golang.org/grpc" 20 21import io "io" 22 23// Reference imports to suppress errors if they are not otherwise used. 24var _ = proto.Marshal 25var _ = fmt.Errorf 26var _ = math.Inf 27 28// This is a compile-time assertion to ensure that this generated file 29// is compatible with the proto package it is being compiled against. 30// A compilation error at this line likely means your copy of the 31// proto package needs to be updated. 32const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 33 34type Listener_DrainType int32 35 36const ( 37 // Drain in response to calling /healthcheck/fail admin endpoint (along with the health check 38 // filter), listener removal/modification, and hot restart. 39 Listener_DEFAULT Listener_DrainType = 0 40 // Drain in response to listener removal/modification and hot restart. This setting does not 41 // include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress 42 // and egress listeners. 43 Listener_MODIFY_ONLY Listener_DrainType = 1 44) 45 46var Listener_DrainType_name = map[int32]string{ 47 0: "DEFAULT", 48 1: "MODIFY_ONLY", 49} 50var Listener_DrainType_value = map[string]int32{ 51 "DEFAULT": 0, 52 "MODIFY_ONLY": 1, 53} 54 55func (x Listener_DrainType) String() string { 56 return proto.EnumName(Listener_DrainType_name, int32(x)) 57} 58func (Listener_DrainType) EnumDescriptor() ([]byte, []int) { 59 return fileDescriptor_lds_e1558ab11a5a16bb, []int{0, 0} 60} 61 62type Listener struct { 63 // The unique name by which this listener is known. If no name is provided, 64 // Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically 65 // updated or removed via :ref:`LDS <config_listeners_lds>` a unique name must be provided. 66 // By default, the maximum length of a listener's name is limited to 60 characters. This limit can 67 // be increased by setting the :option:`--max-obj-name-len` command line argument to the desired 68 // value. 69 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 70 // The address that the listener should listen on. In general, the address must be unique, though 71 // that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on 72 // Linux as the actual port will be allocated by the OS. 73 Address core.Address `protobuf:"bytes,2,opt,name=address" json:"address"` 74 // A list of filter chains to consider for this listener. The 75 // :ref:`FilterChain <envoy_api_msg_listener.FilterChain>` with the most specific 76 // :ref:`FilterChainMatch <envoy_api_msg_listener.FilterChainMatch>` criteria is used on a 77 // connection. 78 // 79 // Example using SNI for filter chain selection can be found in the 80 // :ref:`FAQ entry <faq_how_to_setup_sni>`. 81 FilterChains []listener.FilterChain `protobuf:"bytes,3,rep,name=filter_chains,json=filterChains" json:"filter_chains"` 82 // If a connection is redirected using *iptables*, the port on which the proxy 83 // receives it might be different from the original destination address. When this flag is set to 84 // true, the listener hands off redirected connections to the listener associated with the 85 // original destination address. If there is no listener associated with the original destination 86 // address, the connection is handled by the listener that receives it. Defaults to false. 87 // 88 // .. attention:: 89 // 90 // This field is deprecated. Use :ref:`an original_dst <config_listener_filters_original_dst>` 91 // :ref:`listener filter <envoy_api_field_Listener.listener_filters>` instead. 92 // 93 // Note that hand off to another listener is *NOT* performed without this flag. Once 94 // :ref:`FilterChainMatch <envoy_api_msg_listener.FilterChainMatch>` is implemented this flag 95 // will be removed, as filter chain matching can be used to select a filter chain based on the 96 // restored destination address. 97 UseOriginalDst *types.BoolValue `protobuf:"bytes,4,opt,name=use_original_dst,json=useOriginalDst" json:"use_original_dst,omitempty"` // Deprecated: Do not use. 98 // Soft limit on size of the listener’s new connection read and write buffers. 99 // If unspecified, an implementation defined default is applied (1MiB). 100 PerConnectionBufferLimitBytes *types.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes" json:"per_connection_buffer_limit_bytes,omitempty"` 101 // Listener metadata. 102 Metadata *core.Metadata `protobuf:"bytes,6,opt,name=metadata" json:"metadata,omitempty"` 103 // [#not-implemented-hide:] 104 DeprecatedV1 *Listener_DeprecatedV1 `protobuf:"bytes,7,opt,name=deprecated_v1,json=deprecatedV1" json:"deprecated_v1,omitempty"` 105 // The type of draining to perform at a listener-wide level. 106 DrainType Listener_DrainType `protobuf:"varint,8,opt,name=drain_type,json=drainType,proto3,enum=envoy.api.v2.Listener_DrainType" json:"drain_type,omitempty"` 107 // Listener filters have the opportunity to manipulate and augment the connection metadata that 108 // is used in connection filter chain matching, for example. These filters are run before any in 109 // :ref:`filter_chains <envoy_api_field_Listener.filter_chains>`. Order matters as the 110 // filters are processed sequentially right after a socket has been accepted by the listener, and 111 // before a connection is created. 112 ListenerFilters []listener.ListenerFilter `protobuf:"bytes,9,rep,name=listener_filters,json=listenerFilters" json:"listener_filters"` 113 // Whether the listener should be set as a transparent socket. 114 // When this flag is set to true, connections can be redirected to the listener using an 115 // *iptables* *TPROXY* target, in which case the original source and destination addresses and 116 // ports are preserved on accepted connections. This flag should be used in combination with 117 // :ref:`an original_dst <config_listener_filters_original_dst>` :ref:`listener filter 118 // <envoy_api_field_Listener.listener_filters>` to mark the connections' local addresses as 119 // "restored." This can be used to hand off each redirected connection to another listener 120 // associated with the connection's destination address. Direct connections to the socket without 121 // using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are 122 // therefore treated as if they were redirected. 123 // When this flag is set to false, the listener's socket is explicitly reset as non-transparent. 124 // Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. 125 // When this flag is not set (default), the socket is not modified, i.e. the transparent option 126 // is neither set nor reset. 127 Transparent *types.BoolValue `protobuf:"bytes,10,opt,name=transparent" json:"transparent,omitempty"` 128 // Whether the listener should set the *IP_FREEBIND* socket option. When this 129 // flag is set to true, listeners can be bound to an IP address that is not 130 // configured on the system running Envoy. When this flag is set to false, the 131 // option *IP_FREEBIND* is disabled on the socket. When this flag is not set 132 // (default), the socket is not modified, i.e. the option is neither enabled 133 // nor disabled. 134 Freebind *types.BoolValue `protobuf:"bytes,11,opt,name=freebind" json:"freebind,omitempty"` 135 // Additional socket options that may not be present in Envoy source code or 136 // precompiled binaries. 137 SocketOptions []*core.SocketOption `protobuf:"bytes,13,rep,name=socket_options,json=socketOptions" json:"socket_options,omitempty"` 138 // Whether the listener should accept TCP Fast Open (TFO) connections. 139 // When this flag is set to a value greater than 0, the option TCP_FASTOPEN is enabled on 140 // the socket, with a queue length of the specified size 141 // (see `details in RFC7413 <https://tools.ietf.org/html/rfc7413#section-5.1>`_). 142 // When this flag is set to 0, the option TCP_FASTOPEN is disabled on the socket. 143 // When this flag is not set (default), the socket is not modified, 144 // i.e. the option is neither enabled nor disabled. 145 // 146 // On Linux, the net.ipv4.tcp_fastopen kernel parameter must include flag 0x2 to enable 147 // TCP_FASTOPEN. 148 // See `ip-sysctl.txt <https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt>`_. 149 // 150 // On macOS, only values of 0, 1, and unset are valid; other values may result in an error. 151 // To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. 152 TcpFastOpenQueueLength *types.UInt32Value `protobuf:"bytes,12,opt,name=tcp_fast_open_queue_length,json=tcpFastOpenQueueLength" json:"tcp_fast_open_queue_length,omitempty"` 153 XXX_NoUnkeyedLiteral struct{} `json:"-"` 154 XXX_unrecognized []byte `json:"-"` 155 XXX_sizecache int32 `json:"-"` 156} 157 158func (m *Listener) Reset() { *m = Listener{} } 159func (m *Listener) String() string { return proto.CompactTextString(m) } 160func (*Listener) ProtoMessage() {} 161func (*Listener) Descriptor() ([]byte, []int) { 162 return fileDescriptor_lds_e1558ab11a5a16bb, []int{0} 163} 164func (m *Listener) XXX_Unmarshal(b []byte) error { 165 return m.Unmarshal(b) 166} 167func (m *Listener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 168 if deterministic { 169 return xxx_messageInfo_Listener.Marshal(b, m, deterministic) 170 } else { 171 b = b[:cap(b)] 172 n, err := m.MarshalTo(b) 173 if err != nil { 174 return nil, err 175 } 176 return b[:n], nil 177 } 178} 179func (dst *Listener) XXX_Merge(src proto.Message) { 180 xxx_messageInfo_Listener.Merge(dst, src) 181} 182func (m *Listener) XXX_Size() int { 183 return m.Size() 184} 185func (m *Listener) XXX_DiscardUnknown() { 186 xxx_messageInfo_Listener.DiscardUnknown(m) 187} 188 189var xxx_messageInfo_Listener proto.InternalMessageInfo 190 191func (m *Listener) GetName() string { 192 if m != nil { 193 return m.Name 194 } 195 return "" 196} 197 198func (m *Listener) GetAddress() core.Address { 199 if m != nil { 200 return m.Address 201 } 202 return core.Address{} 203} 204 205func (m *Listener) GetFilterChains() []listener.FilterChain { 206 if m != nil { 207 return m.FilterChains 208 } 209 return nil 210} 211 212// Deprecated: Do not use. 213func (m *Listener) GetUseOriginalDst() *types.BoolValue { 214 if m != nil { 215 return m.UseOriginalDst 216 } 217 return nil 218} 219 220func (m *Listener) GetPerConnectionBufferLimitBytes() *types.UInt32Value { 221 if m != nil { 222 return m.PerConnectionBufferLimitBytes 223 } 224 return nil 225} 226 227func (m *Listener) GetMetadata() *core.Metadata { 228 if m != nil { 229 return m.Metadata 230 } 231 return nil 232} 233 234func (m *Listener) GetDeprecatedV1() *Listener_DeprecatedV1 { 235 if m != nil { 236 return m.DeprecatedV1 237 } 238 return nil 239} 240 241func (m *Listener) GetDrainType() Listener_DrainType { 242 if m != nil { 243 return m.DrainType 244 } 245 return Listener_DEFAULT 246} 247 248func (m *Listener) GetListenerFilters() []listener.ListenerFilter { 249 if m != nil { 250 return m.ListenerFilters 251 } 252 return nil 253} 254 255func (m *Listener) GetTransparent() *types.BoolValue { 256 if m != nil { 257 return m.Transparent 258 } 259 return nil 260} 261 262func (m *Listener) GetFreebind() *types.BoolValue { 263 if m != nil { 264 return m.Freebind 265 } 266 return nil 267} 268 269func (m *Listener) GetSocketOptions() []*core.SocketOption { 270 if m != nil { 271 return m.SocketOptions 272 } 273 return nil 274} 275 276func (m *Listener) GetTcpFastOpenQueueLength() *types.UInt32Value { 277 if m != nil { 278 return m.TcpFastOpenQueueLength 279 } 280 return nil 281} 282 283// [#not-implemented-hide:] 284type Listener_DeprecatedV1 struct { 285 // Whether the listener should bind to the port. A listener that doesn’t 286 // bind can only receive connections redirected from other listeners that 287 // set use_original_dst parameter to true. Default is true. 288 // 289 // [V2-API-DIFF] This is deprecated in v2, all Listeners will bind to their 290 // port. An additional filter chain must be created for every original 291 // destination port this listener may redirect to in v2, with the original 292 // port specified in the FilterChainMatch destination_port field. 293 BindToPort *types.BoolValue `protobuf:"bytes,1,opt,name=bind_to_port,json=bindToPort" json:"bind_to_port,omitempty"` 294 XXX_NoUnkeyedLiteral struct{} `json:"-"` 295 XXX_unrecognized []byte `json:"-"` 296 XXX_sizecache int32 `json:"-"` 297} 298 299func (m *Listener_DeprecatedV1) Reset() { *m = Listener_DeprecatedV1{} } 300func (m *Listener_DeprecatedV1) String() string { return proto.CompactTextString(m) } 301func (*Listener_DeprecatedV1) ProtoMessage() {} 302func (*Listener_DeprecatedV1) Descriptor() ([]byte, []int) { 303 return fileDescriptor_lds_e1558ab11a5a16bb, []int{0, 0} 304} 305func (m *Listener_DeprecatedV1) XXX_Unmarshal(b []byte) error { 306 return m.Unmarshal(b) 307} 308func (m *Listener_DeprecatedV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 309 if deterministic { 310 return xxx_messageInfo_Listener_DeprecatedV1.Marshal(b, m, deterministic) 311 } else { 312 b = b[:cap(b)] 313 n, err := m.MarshalTo(b) 314 if err != nil { 315 return nil, err 316 } 317 return b[:n], nil 318 } 319} 320func (dst *Listener_DeprecatedV1) XXX_Merge(src proto.Message) { 321 xxx_messageInfo_Listener_DeprecatedV1.Merge(dst, src) 322} 323func (m *Listener_DeprecatedV1) XXX_Size() int { 324 return m.Size() 325} 326func (m *Listener_DeprecatedV1) XXX_DiscardUnknown() { 327 xxx_messageInfo_Listener_DeprecatedV1.DiscardUnknown(m) 328} 329 330var xxx_messageInfo_Listener_DeprecatedV1 proto.InternalMessageInfo 331 332func (m *Listener_DeprecatedV1) GetBindToPort() *types.BoolValue { 333 if m != nil { 334 return m.BindToPort 335 } 336 return nil 337} 338 339func init() { 340 proto.RegisterType((*Listener)(nil), "envoy.api.v2.Listener") 341 proto.RegisterType((*Listener_DeprecatedV1)(nil), "envoy.api.v2.Listener.DeprecatedV1") 342 proto.RegisterEnum("envoy.api.v2.Listener_DrainType", Listener_DrainType_name, Listener_DrainType_value) 343} 344func (this *Listener) Equal(that interface{}) bool { 345 if that == nil { 346 return this == nil 347 } 348 349 that1, ok := that.(*Listener) 350 if !ok { 351 that2, ok := that.(Listener) 352 if ok { 353 that1 = &that2 354 } else { 355 return false 356 } 357 } 358 if that1 == nil { 359 return this == nil 360 } else if this == nil { 361 return false 362 } 363 if this.Name != that1.Name { 364 return false 365 } 366 if !this.Address.Equal(&that1.Address) { 367 return false 368 } 369 if len(this.FilterChains) != len(that1.FilterChains) { 370 return false 371 } 372 for i := range this.FilterChains { 373 if !this.FilterChains[i].Equal(&that1.FilterChains[i]) { 374 return false 375 } 376 } 377 if !this.UseOriginalDst.Equal(that1.UseOriginalDst) { 378 return false 379 } 380 if !this.PerConnectionBufferLimitBytes.Equal(that1.PerConnectionBufferLimitBytes) { 381 return false 382 } 383 if !this.Metadata.Equal(that1.Metadata) { 384 return false 385 } 386 if !this.DeprecatedV1.Equal(that1.DeprecatedV1) { 387 return false 388 } 389 if this.DrainType != that1.DrainType { 390 return false 391 } 392 if len(this.ListenerFilters) != len(that1.ListenerFilters) { 393 return false 394 } 395 for i := range this.ListenerFilters { 396 if !this.ListenerFilters[i].Equal(&that1.ListenerFilters[i]) { 397 return false 398 } 399 } 400 if !this.Transparent.Equal(that1.Transparent) { 401 return false 402 } 403 if !this.Freebind.Equal(that1.Freebind) { 404 return false 405 } 406 if len(this.SocketOptions) != len(that1.SocketOptions) { 407 return false 408 } 409 for i := range this.SocketOptions { 410 if !this.SocketOptions[i].Equal(that1.SocketOptions[i]) { 411 return false 412 } 413 } 414 if !this.TcpFastOpenQueueLength.Equal(that1.TcpFastOpenQueueLength) { 415 return false 416 } 417 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 418 return false 419 } 420 return true 421} 422func (this *Listener_DeprecatedV1) Equal(that interface{}) bool { 423 if that == nil { 424 return this == nil 425 } 426 427 that1, ok := that.(*Listener_DeprecatedV1) 428 if !ok { 429 that2, ok := that.(Listener_DeprecatedV1) 430 if ok { 431 that1 = &that2 432 } else { 433 return false 434 } 435 } 436 if that1 == nil { 437 return this == nil 438 } else if this == nil { 439 return false 440 } 441 if !this.BindToPort.Equal(that1.BindToPort) { 442 return false 443 } 444 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 445 return false 446 } 447 return true 448} 449 450// Reference imports to suppress errors if they are not otherwise used. 451var _ context.Context 452var _ grpc.ClientConn 453 454// This is a compile-time assertion to ensure that this generated file 455// is compatible with the grpc package it is being compiled against. 456const _ = grpc.SupportPackageIsVersion4 457 458// Client API for ListenerDiscoveryService service 459 460type ListenerDiscoveryServiceClient interface { 461 StreamListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_StreamListenersClient, error) 462 FetchListeners(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) 463} 464 465type listenerDiscoveryServiceClient struct { 466 cc *grpc.ClientConn 467} 468 469func NewListenerDiscoveryServiceClient(cc *grpc.ClientConn) ListenerDiscoveryServiceClient { 470 return &listenerDiscoveryServiceClient{cc} 471} 472 473func (c *listenerDiscoveryServiceClient) StreamListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_StreamListenersClient, error) { 474 stream, err := c.cc.NewStream(ctx, &_ListenerDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.ListenerDiscoveryService/StreamListeners", opts...) 475 if err != nil { 476 return nil, err 477 } 478 x := &listenerDiscoveryServiceStreamListenersClient{stream} 479 return x, nil 480} 481 482type ListenerDiscoveryService_StreamListenersClient interface { 483 Send(*DiscoveryRequest) error 484 Recv() (*DiscoveryResponse, error) 485 grpc.ClientStream 486} 487 488type listenerDiscoveryServiceStreamListenersClient struct { 489 grpc.ClientStream 490} 491 492func (x *listenerDiscoveryServiceStreamListenersClient) Send(m *DiscoveryRequest) error { 493 return x.ClientStream.SendMsg(m) 494} 495 496func (x *listenerDiscoveryServiceStreamListenersClient) Recv() (*DiscoveryResponse, error) { 497 m := new(DiscoveryResponse) 498 if err := x.ClientStream.RecvMsg(m); err != nil { 499 return nil, err 500 } 501 return m, nil 502} 503 504func (c *listenerDiscoveryServiceClient) FetchListeners(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { 505 out := new(DiscoveryResponse) 506 err := c.cc.Invoke(ctx, "/envoy.api.v2.ListenerDiscoveryService/FetchListeners", in, out, opts...) 507 if err != nil { 508 return nil, err 509 } 510 return out, nil 511} 512 513// Server API for ListenerDiscoveryService service 514 515type ListenerDiscoveryServiceServer interface { 516 StreamListeners(ListenerDiscoveryService_StreamListenersServer) error 517 FetchListeners(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) 518} 519 520func RegisterListenerDiscoveryServiceServer(s *grpc.Server, srv ListenerDiscoveryServiceServer) { 521 s.RegisterService(&_ListenerDiscoveryService_serviceDesc, srv) 522} 523 524func _ListenerDiscoveryService_StreamListeners_Handler(srv interface{}, stream grpc.ServerStream) error { 525 return srv.(ListenerDiscoveryServiceServer).StreamListeners(&listenerDiscoveryServiceStreamListenersServer{stream}) 526} 527 528type ListenerDiscoveryService_StreamListenersServer interface { 529 Send(*DiscoveryResponse) error 530 Recv() (*DiscoveryRequest, error) 531 grpc.ServerStream 532} 533 534type listenerDiscoveryServiceStreamListenersServer struct { 535 grpc.ServerStream 536} 537 538func (x *listenerDiscoveryServiceStreamListenersServer) Send(m *DiscoveryResponse) error { 539 return x.ServerStream.SendMsg(m) 540} 541 542func (x *listenerDiscoveryServiceStreamListenersServer) Recv() (*DiscoveryRequest, error) { 543 m := new(DiscoveryRequest) 544 if err := x.ServerStream.RecvMsg(m); err != nil { 545 return nil, err 546 } 547 return m, nil 548} 549 550func _ListenerDiscoveryService_FetchListeners_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 551 in := new(DiscoveryRequest) 552 if err := dec(in); err != nil { 553 return nil, err 554 } 555 if interceptor == nil { 556 return srv.(ListenerDiscoveryServiceServer).FetchListeners(ctx, in) 557 } 558 info := &grpc.UnaryServerInfo{ 559 Server: srv, 560 FullMethod: "/envoy.api.v2.ListenerDiscoveryService/FetchListeners", 561 } 562 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 563 return srv.(ListenerDiscoveryServiceServer).FetchListeners(ctx, req.(*DiscoveryRequest)) 564 } 565 return interceptor(ctx, in, info, handler) 566} 567 568var _ListenerDiscoveryService_serviceDesc = grpc.ServiceDesc{ 569 ServiceName: "envoy.api.v2.ListenerDiscoveryService", 570 HandlerType: (*ListenerDiscoveryServiceServer)(nil), 571 Methods: []grpc.MethodDesc{ 572 { 573 MethodName: "FetchListeners", 574 Handler: _ListenerDiscoveryService_FetchListeners_Handler, 575 }, 576 }, 577 Streams: []grpc.StreamDesc{ 578 { 579 StreamName: "StreamListeners", 580 Handler: _ListenerDiscoveryService_StreamListeners_Handler, 581 ServerStreams: true, 582 ClientStreams: true, 583 }, 584 }, 585 Metadata: "envoy/api/v2/lds.proto", 586} 587 588func (m *Listener) Marshal() (dAtA []byte, err error) { 589 size := m.Size() 590 dAtA = make([]byte, size) 591 n, err := m.MarshalTo(dAtA) 592 if err != nil { 593 return nil, err 594 } 595 return dAtA[:n], nil 596} 597 598func (m *Listener) MarshalTo(dAtA []byte) (int, error) { 599 var i int 600 _ = i 601 var l int 602 _ = l 603 if len(m.Name) > 0 { 604 dAtA[i] = 0xa 605 i++ 606 i = encodeVarintLds(dAtA, i, uint64(len(m.Name))) 607 i += copy(dAtA[i:], m.Name) 608 } 609 dAtA[i] = 0x12 610 i++ 611 i = encodeVarintLds(dAtA, i, uint64(m.Address.Size())) 612 n1, err := m.Address.MarshalTo(dAtA[i:]) 613 if err != nil { 614 return 0, err 615 } 616 i += n1 617 if len(m.FilterChains) > 0 { 618 for _, msg := range m.FilterChains { 619 dAtA[i] = 0x1a 620 i++ 621 i = encodeVarintLds(dAtA, i, uint64(msg.Size())) 622 n, err := msg.MarshalTo(dAtA[i:]) 623 if err != nil { 624 return 0, err 625 } 626 i += n 627 } 628 } 629 if m.UseOriginalDst != nil { 630 dAtA[i] = 0x22 631 i++ 632 i = encodeVarintLds(dAtA, i, uint64(m.UseOriginalDst.Size())) 633 n2, err := m.UseOriginalDst.MarshalTo(dAtA[i:]) 634 if err != nil { 635 return 0, err 636 } 637 i += n2 638 } 639 if m.PerConnectionBufferLimitBytes != nil { 640 dAtA[i] = 0x2a 641 i++ 642 i = encodeVarintLds(dAtA, i, uint64(m.PerConnectionBufferLimitBytes.Size())) 643 n3, err := m.PerConnectionBufferLimitBytes.MarshalTo(dAtA[i:]) 644 if err != nil { 645 return 0, err 646 } 647 i += n3 648 } 649 if m.Metadata != nil { 650 dAtA[i] = 0x32 651 i++ 652 i = encodeVarintLds(dAtA, i, uint64(m.Metadata.Size())) 653 n4, err := m.Metadata.MarshalTo(dAtA[i:]) 654 if err != nil { 655 return 0, err 656 } 657 i += n4 658 } 659 if m.DeprecatedV1 != nil { 660 dAtA[i] = 0x3a 661 i++ 662 i = encodeVarintLds(dAtA, i, uint64(m.DeprecatedV1.Size())) 663 n5, err := m.DeprecatedV1.MarshalTo(dAtA[i:]) 664 if err != nil { 665 return 0, err 666 } 667 i += n5 668 } 669 if m.DrainType != 0 { 670 dAtA[i] = 0x40 671 i++ 672 i = encodeVarintLds(dAtA, i, uint64(m.DrainType)) 673 } 674 if len(m.ListenerFilters) > 0 { 675 for _, msg := range m.ListenerFilters { 676 dAtA[i] = 0x4a 677 i++ 678 i = encodeVarintLds(dAtA, i, uint64(msg.Size())) 679 n, err := msg.MarshalTo(dAtA[i:]) 680 if err != nil { 681 return 0, err 682 } 683 i += n 684 } 685 } 686 if m.Transparent != nil { 687 dAtA[i] = 0x52 688 i++ 689 i = encodeVarintLds(dAtA, i, uint64(m.Transparent.Size())) 690 n6, err := m.Transparent.MarshalTo(dAtA[i:]) 691 if err != nil { 692 return 0, err 693 } 694 i += n6 695 } 696 if m.Freebind != nil { 697 dAtA[i] = 0x5a 698 i++ 699 i = encodeVarintLds(dAtA, i, uint64(m.Freebind.Size())) 700 n7, err := m.Freebind.MarshalTo(dAtA[i:]) 701 if err != nil { 702 return 0, err 703 } 704 i += n7 705 } 706 if m.TcpFastOpenQueueLength != nil { 707 dAtA[i] = 0x62 708 i++ 709 i = encodeVarintLds(dAtA, i, uint64(m.TcpFastOpenQueueLength.Size())) 710 n8, err := m.TcpFastOpenQueueLength.MarshalTo(dAtA[i:]) 711 if err != nil { 712 return 0, err 713 } 714 i += n8 715 } 716 if len(m.SocketOptions) > 0 { 717 for _, msg := range m.SocketOptions { 718 dAtA[i] = 0x6a 719 i++ 720 i = encodeVarintLds(dAtA, i, uint64(msg.Size())) 721 n, err := msg.MarshalTo(dAtA[i:]) 722 if err != nil { 723 return 0, err 724 } 725 i += n 726 } 727 } 728 if m.XXX_unrecognized != nil { 729 i += copy(dAtA[i:], m.XXX_unrecognized) 730 } 731 return i, nil 732} 733 734func (m *Listener_DeprecatedV1) Marshal() (dAtA []byte, err error) { 735 size := m.Size() 736 dAtA = make([]byte, size) 737 n, err := m.MarshalTo(dAtA) 738 if err != nil { 739 return nil, err 740 } 741 return dAtA[:n], nil 742} 743 744func (m *Listener_DeprecatedV1) MarshalTo(dAtA []byte) (int, error) { 745 var i int 746 _ = i 747 var l int 748 _ = l 749 if m.BindToPort != nil { 750 dAtA[i] = 0xa 751 i++ 752 i = encodeVarintLds(dAtA, i, uint64(m.BindToPort.Size())) 753 n9, err := m.BindToPort.MarshalTo(dAtA[i:]) 754 if err != nil { 755 return 0, err 756 } 757 i += n9 758 } 759 if m.XXX_unrecognized != nil { 760 i += copy(dAtA[i:], m.XXX_unrecognized) 761 } 762 return i, nil 763} 764 765func encodeVarintLds(dAtA []byte, offset int, v uint64) int { 766 for v >= 1<<7 { 767 dAtA[offset] = uint8(v&0x7f | 0x80) 768 v >>= 7 769 offset++ 770 } 771 dAtA[offset] = uint8(v) 772 return offset + 1 773} 774func (m *Listener) Size() (n int) { 775 var l int 776 _ = l 777 l = len(m.Name) 778 if l > 0 { 779 n += 1 + l + sovLds(uint64(l)) 780 } 781 l = m.Address.Size() 782 n += 1 + l + sovLds(uint64(l)) 783 if len(m.FilterChains) > 0 { 784 for _, e := range m.FilterChains { 785 l = e.Size() 786 n += 1 + l + sovLds(uint64(l)) 787 } 788 } 789 if m.UseOriginalDst != nil { 790 l = m.UseOriginalDst.Size() 791 n += 1 + l + sovLds(uint64(l)) 792 } 793 if m.PerConnectionBufferLimitBytes != nil { 794 l = m.PerConnectionBufferLimitBytes.Size() 795 n += 1 + l + sovLds(uint64(l)) 796 } 797 if m.Metadata != nil { 798 l = m.Metadata.Size() 799 n += 1 + l + sovLds(uint64(l)) 800 } 801 if m.DeprecatedV1 != nil { 802 l = m.DeprecatedV1.Size() 803 n += 1 + l + sovLds(uint64(l)) 804 } 805 if m.DrainType != 0 { 806 n += 1 + sovLds(uint64(m.DrainType)) 807 } 808 if len(m.ListenerFilters) > 0 { 809 for _, e := range m.ListenerFilters { 810 l = e.Size() 811 n += 1 + l + sovLds(uint64(l)) 812 } 813 } 814 if m.Transparent != nil { 815 l = m.Transparent.Size() 816 n += 1 + l + sovLds(uint64(l)) 817 } 818 if m.Freebind != nil { 819 l = m.Freebind.Size() 820 n += 1 + l + sovLds(uint64(l)) 821 } 822 if m.TcpFastOpenQueueLength != nil { 823 l = m.TcpFastOpenQueueLength.Size() 824 n += 1 + l + sovLds(uint64(l)) 825 } 826 if len(m.SocketOptions) > 0 { 827 for _, e := range m.SocketOptions { 828 l = e.Size() 829 n += 1 + l + sovLds(uint64(l)) 830 } 831 } 832 if m.XXX_unrecognized != nil { 833 n += len(m.XXX_unrecognized) 834 } 835 return n 836} 837 838func (m *Listener_DeprecatedV1) Size() (n int) { 839 var l int 840 _ = l 841 if m.BindToPort != nil { 842 l = m.BindToPort.Size() 843 n += 1 + l + sovLds(uint64(l)) 844 } 845 if m.XXX_unrecognized != nil { 846 n += len(m.XXX_unrecognized) 847 } 848 return n 849} 850 851func sovLds(x uint64) (n int) { 852 for { 853 n++ 854 x >>= 7 855 if x == 0 { 856 break 857 } 858 } 859 return n 860} 861func sozLds(x uint64) (n int) { 862 return sovLds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 863} 864func (m *Listener) Unmarshal(dAtA []byte) error { 865 l := len(dAtA) 866 iNdEx := 0 867 for iNdEx < l { 868 preIndex := iNdEx 869 var wire uint64 870 for shift := uint(0); ; shift += 7 { 871 if shift >= 64 { 872 return ErrIntOverflowLds 873 } 874 if iNdEx >= l { 875 return io.ErrUnexpectedEOF 876 } 877 b := dAtA[iNdEx] 878 iNdEx++ 879 wire |= (uint64(b) & 0x7F) << shift 880 if b < 0x80 { 881 break 882 } 883 } 884 fieldNum := int32(wire >> 3) 885 wireType := int(wire & 0x7) 886 if wireType == 4 { 887 return fmt.Errorf("proto: Listener: wiretype end group for non-group") 888 } 889 if fieldNum <= 0 { 890 return fmt.Errorf("proto: Listener: illegal tag %d (wire type %d)", fieldNum, wire) 891 } 892 switch fieldNum { 893 case 1: 894 if wireType != 2 { 895 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 896 } 897 var stringLen uint64 898 for shift := uint(0); ; shift += 7 { 899 if shift >= 64 { 900 return ErrIntOverflowLds 901 } 902 if iNdEx >= l { 903 return io.ErrUnexpectedEOF 904 } 905 b := dAtA[iNdEx] 906 iNdEx++ 907 stringLen |= (uint64(b) & 0x7F) << shift 908 if b < 0x80 { 909 break 910 } 911 } 912 intStringLen := int(stringLen) 913 if intStringLen < 0 { 914 return ErrInvalidLengthLds 915 } 916 postIndex := iNdEx + intStringLen 917 if postIndex > l { 918 return io.ErrUnexpectedEOF 919 } 920 m.Name = string(dAtA[iNdEx:postIndex]) 921 iNdEx = postIndex 922 case 2: 923 if wireType != 2 { 924 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 925 } 926 var msglen int 927 for shift := uint(0); ; shift += 7 { 928 if shift >= 64 { 929 return ErrIntOverflowLds 930 } 931 if iNdEx >= l { 932 return io.ErrUnexpectedEOF 933 } 934 b := dAtA[iNdEx] 935 iNdEx++ 936 msglen |= (int(b) & 0x7F) << shift 937 if b < 0x80 { 938 break 939 } 940 } 941 if msglen < 0 { 942 return ErrInvalidLengthLds 943 } 944 postIndex := iNdEx + msglen 945 if postIndex > l { 946 return io.ErrUnexpectedEOF 947 } 948 if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 949 return err 950 } 951 iNdEx = postIndex 952 case 3: 953 if wireType != 2 { 954 return fmt.Errorf("proto: wrong wireType = %d for field FilterChains", wireType) 955 } 956 var msglen int 957 for shift := uint(0); ; shift += 7 { 958 if shift >= 64 { 959 return ErrIntOverflowLds 960 } 961 if iNdEx >= l { 962 return io.ErrUnexpectedEOF 963 } 964 b := dAtA[iNdEx] 965 iNdEx++ 966 msglen |= (int(b) & 0x7F) << shift 967 if b < 0x80 { 968 break 969 } 970 } 971 if msglen < 0 { 972 return ErrInvalidLengthLds 973 } 974 postIndex := iNdEx + msglen 975 if postIndex > l { 976 return io.ErrUnexpectedEOF 977 } 978 m.FilterChains = append(m.FilterChains, listener.FilterChain{}) 979 if err := m.FilterChains[len(m.FilterChains)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 980 return err 981 } 982 iNdEx = postIndex 983 case 4: 984 if wireType != 2 { 985 return fmt.Errorf("proto: wrong wireType = %d for field UseOriginalDst", wireType) 986 } 987 var msglen int 988 for shift := uint(0); ; shift += 7 { 989 if shift >= 64 { 990 return ErrIntOverflowLds 991 } 992 if iNdEx >= l { 993 return io.ErrUnexpectedEOF 994 } 995 b := dAtA[iNdEx] 996 iNdEx++ 997 msglen |= (int(b) & 0x7F) << shift 998 if b < 0x80 { 999 break 1000 } 1001 } 1002 if msglen < 0 { 1003 return ErrInvalidLengthLds 1004 } 1005 postIndex := iNdEx + msglen 1006 if postIndex > l { 1007 return io.ErrUnexpectedEOF 1008 } 1009 if m.UseOriginalDst == nil { 1010 m.UseOriginalDst = &types.BoolValue{} 1011 } 1012 if err := m.UseOriginalDst.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1013 return err 1014 } 1015 iNdEx = postIndex 1016 case 5: 1017 if wireType != 2 { 1018 return fmt.Errorf("proto: wrong wireType = %d for field PerConnectionBufferLimitBytes", wireType) 1019 } 1020 var msglen int 1021 for shift := uint(0); ; shift += 7 { 1022 if shift >= 64 { 1023 return ErrIntOverflowLds 1024 } 1025 if iNdEx >= l { 1026 return io.ErrUnexpectedEOF 1027 } 1028 b := dAtA[iNdEx] 1029 iNdEx++ 1030 msglen |= (int(b) & 0x7F) << shift 1031 if b < 0x80 { 1032 break 1033 } 1034 } 1035 if msglen < 0 { 1036 return ErrInvalidLengthLds 1037 } 1038 postIndex := iNdEx + msglen 1039 if postIndex > l { 1040 return io.ErrUnexpectedEOF 1041 } 1042 if m.PerConnectionBufferLimitBytes == nil { 1043 m.PerConnectionBufferLimitBytes = &types.UInt32Value{} 1044 } 1045 if err := m.PerConnectionBufferLimitBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1046 return err 1047 } 1048 iNdEx = postIndex 1049 case 6: 1050 if wireType != 2 { 1051 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 1052 } 1053 var msglen int 1054 for shift := uint(0); ; shift += 7 { 1055 if shift >= 64 { 1056 return ErrIntOverflowLds 1057 } 1058 if iNdEx >= l { 1059 return io.ErrUnexpectedEOF 1060 } 1061 b := dAtA[iNdEx] 1062 iNdEx++ 1063 msglen |= (int(b) & 0x7F) << shift 1064 if b < 0x80 { 1065 break 1066 } 1067 } 1068 if msglen < 0 { 1069 return ErrInvalidLengthLds 1070 } 1071 postIndex := iNdEx + msglen 1072 if postIndex > l { 1073 return io.ErrUnexpectedEOF 1074 } 1075 if m.Metadata == nil { 1076 m.Metadata = &core.Metadata{} 1077 } 1078 if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1079 return err 1080 } 1081 iNdEx = postIndex 1082 case 7: 1083 if wireType != 2 { 1084 return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedV1", wireType) 1085 } 1086 var msglen int 1087 for shift := uint(0); ; shift += 7 { 1088 if shift >= 64 { 1089 return ErrIntOverflowLds 1090 } 1091 if iNdEx >= l { 1092 return io.ErrUnexpectedEOF 1093 } 1094 b := dAtA[iNdEx] 1095 iNdEx++ 1096 msglen |= (int(b) & 0x7F) << shift 1097 if b < 0x80 { 1098 break 1099 } 1100 } 1101 if msglen < 0 { 1102 return ErrInvalidLengthLds 1103 } 1104 postIndex := iNdEx + msglen 1105 if postIndex > l { 1106 return io.ErrUnexpectedEOF 1107 } 1108 if m.DeprecatedV1 == nil { 1109 m.DeprecatedV1 = &Listener_DeprecatedV1{} 1110 } 1111 if err := m.DeprecatedV1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1112 return err 1113 } 1114 iNdEx = postIndex 1115 case 8: 1116 if wireType != 0 { 1117 return fmt.Errorf("proto: wrong wireType = %d for field DrainType", wireType) 1118 } 1119 m.DrainType = 0 1120 for shift := uint(0); ; shift += 7 { 1121 if shift >= 64 { 1122 return ErrIntOverflowLds 1123 } 1124 if iNdEx >= l { 1125 return io.ErrUnexpectedEOF 1126 } 1127 b := dAtA[iNdEx] 1128 iNdEx++ 1129 m.DrainType |= (Listener_DrainType(b) & 0x7F) << shift 1130 if b < 0x80 { 1131 break 1132 } 1133 } 1134 case 9: 1135 if wireType != 2 { 1136 return fmt.Errorf("proto: wrong wireType = %d for field ListenerFilters", wireType) 1137 } 1138 var msglen int 1139 for shift := uint(0); ; shift += 7 { 1140 if shift >= 64 { 1141 return ErrIntOverflowLds 1142 } 1143 if iNdEx >= l { 1144 return io.ErrUnexpectedEOF 1145 } 1146 b := dAtA[iNdEx] 1147 iNdEx++ 1148 msglen |= (int(b) & 0x7F) << shift 1149 if b < 0x80 { 1150 break 1151 } 1152 } 1153 if msglen < 0 { 1154 return ErrInvalidLengthLds 1155 } 1156 postIndex := iNdEx + msglen 1157 if postIndex > l { 1158 return io.ErrUnexpectedEOF 1159 } 1160 m.ListenerFilters = append(m.ListenerFilters, listener.ListenerFilter{}) 1161 if err := m.ListenerFilters[len(m.ListenerFilters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1162 return err 1163 } 1164 iNdEx = postIndex 1165 case 10: 1166 if wireType != 2 { 1167 return fmt.Errorf("proto: wrong wireType = %d for field Transparent", wireType) 1168 } 1169 var msglen int 1170 for shift := uint(0); ; shift += 7 { 1171 if shift >= 64 { 1172 return ErrIntOverflowLds 1173 } 1174 if iNdEx >= l { 1175 return io.ErrUnexpectedEOF 1176 } 1177 b := dAtA[iNdEx] 1178 iNdEx++ 1179 msglen |= (int(b) & 0x7F) << shift 1180 if b < 0x80 { 1181 break 1182 } 1183 } 1184 if msglen < 0 { 1185 return ErrInvalidLengthLds 1186 } 1187 postIndex := iNdEx + msglen 1188 if postIndex > l { 1189 return io.ErrUnexpectedEOF 1190 } 1191 if m.Transparent == nil { 1192 m.Transparent = &types.BoolValue{} 1193 } 1194 if err := m.Transparent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1195 return err 1196 } 1197 iNdEx = postIndex 1198 case 11: 1199 if wireType != 2 { 1200 return fmt.Errorf("proto: wrong wireType = %d for field Freebind", wireType) 1201 } 1202 var msglen int 1203 for shift := uint(0); ; shift += 7 { 1204 if shift >= 64 { 1205 return ErrIntOverflowLds 1206 } 1207 if iNdEx >= l { 1208 return io.ErrUnexpectedEOF 1209 } 1210 b := dAtA[iNdEx] 1211 iNdEx++ 1212 msglen |= (int(b) & 0x7F) << shift 1213 if b < 0x80 { 1214 break 1215 } 1216 } 1217 if msglen < 0 { 1218 return ErrInvalidLengthLds 1219 } 1220 postIndex := iNdEx + msglen 1221 if postIndex > l { 1222 return io.ErrUnexpectedEOF 1223 } 1224 if m.Freebind == nil { 1225 m.Freebind = &types.BoolValue{} 1226 } 1227 if err := m.Freebind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1228 return err 1229 } 1230 iNdEx = postIndex 1231 case 12: 1232 if wireType != 2 { 1233 return fmt.Errorf("proto: wrong wireType = %d for field TcpFastOpenQueueLength", wireType) 1234 } 1235 var msglen int 1236 for shift := uint(0); ; shift += 7 { 1237 if shift >= 64 { 1238 return ErrIntOverflowLds 1239 } 1240 if iNdEx >= l { 1241 return io.ErrUnexpectedEOF 1242 } 1243 b := dAtA[iNdEx] 1244 iNdEx++ 1245 msglen |= (int(b) & 0x7F) << shift 1246 if b < 0x80 { 1247 break 1248 } 1249 } 1250 if msglen < 0 { 1251 return ErrInvalidLengthLds 1252 } 1253 postIndex := iNdEx + msglen 1254 if postIndex > l { 1255 return io.ErrUnexpectedEOF 1256 } 1257 if m.TcpFastOpenQueueLength == nil { 1258 m.TcpFastOpenQueueLength = &types.UInt32Value{} 1259 } 1260 if err := m.TcpFastOpenQueueLength.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1261 return err 1262 } 1263 iNdEx = postIndex 1264 case 13: 1265 if wireType != 2 { 1266 return fmt.Errorf("proto: wrong wireType = %d for field SocketOptions", wireType) 1267 } 1268 var msglen int 1269 for shift := uint(0); ; shift += 7 { 1270 if shift >= 64 { 1271 return ErrIntOverflowLds 1272 } 1273 if iNdEx >= l { 1274 return io.ErrUnexpectedEOF 1275 } 1276 b := dAtA[iNdEx] 1277 iNdEx++ 1278 msglen |= (int(b) & 0x7F) << shift 1279 if b < 0x80 { 1280 break 1281 } 1282 } 1283 if msglen < 0 { 1284 return ErrInvalidLengthLds 1285 } 1286 postIndex := iNdEx + msglen 1287 if postIndex > l { 1288 return io.ErrUnexpectedEOF 1289 } 1290 m.SocketOptions = append(m.SocketOptions, &core.SocketOption{}) 1291 if err := m.SocketOptions[len(m.SocketOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1292 return err 1293 } 1294 iNdEx = postIndex 1295 default: 1296 iNdEx = preIndex 1297 skippy, err := skipLds(dAtA[iNdEx:]) 1298 if err != nil { 1299 return err 1300 } 1301 if skippy < 0 { 1302 return ErrInvalidLengthLds 1303 } 1304 if (iNdEx + skippy) > l { 1305 return io.ErrUnexpectedEOF 1306 } 1307 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1308 iNdEx += skippy 1309 } 1310 } 1311 1312 if iNdEx > l { 1313 return io.ErrUnexpectedEOF 1314 } 1315 return nil 1316} 1317func (m *Listener_DeprecatedV1) Unmarshal(dAtA []byte) error { 1318 l := len(dAtA) 1319 iNdEx := 0 1320 for iNdEx < l { 1321 preIndex := iNdEx 1322 var wire uint64 1323 for shift := uint(0); ; shift += 7 { 1324 if shift >= 64 { 1325 return ErrIntOverflowLds 1326 } 1327 if iNdEx >= l { 1328 return io.ErrUnexpectedEOF 1329 } 1330 b := dAtA[iNdEx] 1331 iNdEx++ 1332 wire |= (uint64(b) & 0x7F) << shift 1333 if b < 0x80 { 1334 break 1335 } 1336 } 1337 fieldNum := int32(wire >> 3) 1338 wireType := int(wire & 0x7) 1339 if wireType == 4 { 1340 return fmt.Errorf("proto: DeprecatedV1: wiretype end group for non-group") 1341 } 1342 if fieldNum <= 0 { 1343 return fmt.Errorf("proto: DeprecatedV1: illegal tag %d (wire type %d)", fieldNum, wire) 1344 } 1345 switch fieldNum { 1346 case 1: 1347 if wireType != 2 { 1348 return fmt.Errorf("proto: wrong wireType = %d for field BindToPort", wireType) 1349 } 1350 var msglen int 1351 for shift := uint(0); ; shift += 7 { 1352 if shift >= 64 { 1353 return ErrIntOverflowLds 1354 } 1355 if iNdEx >= l { 1356 return io.ErrUnexpectedEOF 1357 } 1358 b := dAtA[iNdEx] 1359 iNdEx++ 1360 msglen |= (int(b) & 0x7F) << shift 1361 if b < 0x80 { 1362 break 1363 } 1364 } 1365 if msglen < 0 { 1366 return ErrInvalidLengthLds 1367 } 1368 postIndex := iNdEx + msglen 1369 if postIndex > l { 1370 return io.ErrUnexpectedEOF 1371 } 1372 if m.BindToPort == nil { 1373 m.BindToPort = &types.BoolValue{} 1374 } 1375 if err := m.BindToPort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1376 return err 1377 } 1378 iNdEx = postIndex 1379 default: 1380 iNdEx = preIndex 1381 skippy, err := skipLds(dAtA[iNdEx:]) 1382 if err != nil { 1383 return err 1384 } 1385 if skippy < 0 { 1386 return ErrInvalidLengthLds 1387 } 1388 if (iNdEx + skippy) > l { 1389 return io.ErrUnexpectedEOF 1390 } 1391 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1392 iNdEx += skippy 1393 } 1394 } 1395 1396 if iNdEx > l { 1397 return io.ErrUnexpectedEOF 1398 } 1399 return nil 1400} 1401func skipLds(dAtA []byte) (n int, err error) { 1402 l := len(dAtA) 1403 iNdEx := 0 1404 for iNdEx < l { 1405 var wire uint64 1406 for shift := uint(0); ; shift += 7 { 1407 if shift >= 64 { 1408 return 0, ErrIntOverflowLds 1409 } 1410 if iNdEx >= l { 1411 return 0, io.ErrUnexpectedEOF 1412 } 1413 b := dAtA[iNdEx] 1414 iNdEx++ 1415 wire |= (uint64(b) & 0x7F) << shift 1416 if b < 0x80 { 1417 break 1418 } 1419 } 1420 wireType := int(wire & 0x7) 1421 switch wireType { 1422 case 0: 1423 for shift := uint(0); ; shift += 7 { 1424 if shift >= 64 { 1425 return 0, ErrIntOverflowLds 1426 } 1427 if iNdEx >= l { 1428 return 0, io.ErrUnexpectedEOF 1429 } 1430 iNdEx++ 1431 if dAtA[iNdEx-1] < 0x80 { 1432 break 1433 } 1434 } 1435 return iNdEx, nil 1436 case 1: 1437 iNdEx += 8 1438 return iNdEx, nil 1439 case 2: 1440 var length int 1441 for shift := uint(0); ; shift += 7 { 1442 if shift >= 64 { 1443 return 0, ErrIntOverflowLds 1444 } 1445 if iNdEx >= l { 1446 return 0, io.ErrUnexpectedEOF 1447 } 1448 b := dAtA[iNdEx] 1449 iNdEx++ 1450 length |= (int(b) & 0x7F) << shift 1451 if b < 0x80 { 1452 break 1453 } 1454 } 1455 iNdEx += length 1456 if length < 0 { 1457 return 0, ErrInvalidLengthLds 1458 } 1459 return iNdEx, nil 1460 case 3: 1461 for { 1462 var innerWire uint64 1463 var start int = iNdEx 1464 for shift := uint(0); ; shift += 7 { 1465 if shift >= 64 { 1466 return 0, ErrIntOverflowLds 1467 } 1468 if iNdEx >= l { 1469 return 0, io.ErrUnexpectedEOF 1470 } 1471 b := dAtA[iNdEx] 1472 iNdEx++ 1473 innerWire |= (uint64(b) & 0x7F) << shift 1474 if b < 0x80 { 1475 break 1476 } 1477 } 1478 innerWireType := int(innerWire & 0x7) 1479 if innerWireType == 4 { 1480 break 1481 } 1482 next, err := skipLds(dAtA[start:]) 1483 if err != nil { 1484 return 0, err 1485 } 1486 iNdEx = start + next 1487 } 1488 return iNdEx, nil 1489 case 4: 1490 return iNdEx, nil 1491 case 5: 1492 iNdEx += 4 1493 return iNdEx, nil 1494 default: 1495 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1496 } 1497 } 1498 panic("unreachable") 1499} 1500 1501var ( 1502 ErrInvalidLengthLds = fmt.Errorf("proto: negative length found during unmarshaling") 1503 ErrIntOverflowLds = fmt.Errorf("proto: integer overflow") 1504) 1505 1506func init() { proto.RegisterFile("envoy/api/v2/lds.proto", fileDescriptor_lds_e1558ab11a5a16bb) } 1507 1508var fileDescriptor_lds_e1558ab11a5a16bb = []byte{ 1509 // 789 bytes of a gzipped FileDescriptorProto 1510 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x8f, 0xdb, 0x44, 1511 0x18, 0xc6, 0x77, 0xb2, 0xdb, 0x6e, 0x76, 0xf2, 0x67, 0xa3, 0x01, 0xb5, 0x56, 0x58, 0x92, 0x10, 1512 0x40, 0x0a, 0x1c, 0x1c, 0x9a, 0x4a, 0x20, 0x55, 0x95, 0x50, 0xd3, 0x10, 0xb5, 0x52, 0x4a, 0xc0, 1513 0xbb, 0x5d, 0xda, 0xd3, 0x68, 0x62, 0xbf, 0xce, 0x5a, 0x38, 0x33, 0xd3, 0x99, 0x71, 0x50, 0xae, 1514 0x9c, 0x10, 0x47, 0xb8, 0xf2, 0x01, 0xf8, 0x0c, 0x9c, 0x38, 0xf6, 0x88, 0xc4, 0x1d, 0xa1, 0x88, 1515 0x0b, 0xe2, 0x4b, 0x20, 0x4f, 0x6c, 0x93, 0xa8, 0xbb, 0x2c, 0x07, 0x6e, 0xef, 0xcc, 0xfb, 0x7b, 1516 0x1f, 0x8f, 0x9f, 0xc7, 0x1e, 0x7c, 0x0b, 0xf8, 0x52, 0xac, 0xfa, 0x4c, 0x46, 0xfd, 0xe5, 0xa0, 1517 0x1f, 0x07, 0xda, 0x95, 0x4a, 0x18, 0x41, 0xaa, 0x76, 0xdf, 0x65, 0x32, 0x72, 0x97, 0x83, 0x66, 1518 0x7b, 0x87, 0xf2, 0x85, 0x82, 0x3e, 0x0b, 0x02, 0x05, 0x3a, 0xc3, 0x9b, 0x27, 0xaf, 0x02, 0x33, 1519 0xa6, 0xe1, 0xd2, 0x6e, 0x10, 0x69, 0x5f, 0x2c, 0x41, 0xad, 0xb2, 0xee, 0x3b, 0xbb, 0x47, 0x88, 1520 0xb4, 0x01, 0x0e, 0xaa, 0x28, 0x72, 0x8d, 0xb9, 0x10, 0xf3, 0x18, 0x2c, 0xc6, 0x38, 0x17, 0x86, 1521 0x99, 0x48, 0xf0, 0xfc, 0xf9, 0xad, 0xac, 0x6b, 0x57, 0xb3, 0x24, 0xec, 0x7f, 0xa5, 0x98, 0x94, 1522 0xa0, 0xf2, 0xfe, 0xed, 0x25, 0x8b, 0xa3, 0x80, 0x19, 0xe8, 0xe7, 0x45, 0xd6, 0x78, 0x7d, 0x2e, 1523 0xe6, 0xc2, 0x96, 0xfd, 0xb4, 0xda, 0xec, 0x76, 0x7f, 0x28, 0xe3, 0xf2, 0x24, 0x7b, 0x3e, 0x21, 1524 0xf8, 0x80, 0xb3, 0x05, 0x38, 0xa8, 0x83, 0x7a, 0x47, 0x9e, 0xad, 0xc9, 0x08, 0x1f, 0x66, 0x06, 1525 0x38, 0xa5, 0x0e, 0xea, 0x55, 0x06, 0x4d, 0x77, 0xdb, 0x30, 0x37, 0x75, 0xc0, 0x7d, 0xb0, 0x21, 1526 0x86, 0xf5, 0x97, 0xbf, 0xb5, 0xf7, 0x7e, 0xfa, 0xf3, 0xe7, 0xfd, 0x1b, 0xdf, 0xa2, 0x52, 0x03, 1527 0x79, 0xf9, 0x28, 0xf9, 0x02, 0xd7, 0xc2, 0x28, 0x36, 0xa0, 0xa8, 0x7f, 0xc1, 0x22, 0xae, 0x9d, 1528 0xfd, 0xce, 0x7e, 0xaf, 0x32, 0xe8, 0xee, 0x6a, 0x15, 0x46, 0x8c, 0x2d, 0xfb, 0x30, 0x45, 0xb7, 1529 0x34, 0xbf, 0x43, 0xa5, 0x32, 0xf2, 0xaa, 0xe1, 0x3f, 0x4d, 0x4d, 0x1e, 0xe1, 0x46, 0xa2, 0x81, 1530 0x0a, 0x15, 0xcd, 0x23, 0xce, 0x62, 0x1a, 0x68, 0xe3, 0x1c, 0x64, 0xe7, 0xdc, 0x38, 0xe5, 0xe6, 1531 0x4e, 0xb9, 0x43, 0x21, 0xe2, 0x73, 0x16, 0x27, 0x30, 0x2c, 0x39, 0xc8, 0xab, 0x27, 0x1a, 0xa6, 1532 0xd9, 0xd8, 0x48, 0x1b, 0x12, 0xe2, 0xb7, 0x64, 0x7a, 0x3e, 0xc1, 0x39, 0xf8, 0xa9, 0xe3, 0x74, 1533 0x96, 0x84, 0x21, 0x28, 0x1a, 0x47, 0x8b, 0xc8, 0xd0, 0xd9, 0xca, 0x80, 0x76, 0x6e, 0x58, 0xe9, 1534 0x93, 0x57, 0xa4, 0x9f, 0x3e, 0xe6, 0xe6, 0xee, 0xc0, 0x8a, 0x7b, 0x6f, 0x4a, 0x50, 0x0f, 0x0b, 1535 0x95, 0xa1, 0x15, 0x99, 0xa4, 0x1a, 0xc3, 0x54, 0x82, 0x7c, 0x84, 0xcb, 0x0b, 0x30, 0x2c, 0x60, 1536 0x86, 0x39, 0x37, 0xad, 0xdc, 0x1b, 0x97, 0x38, 0xfa, 0x24, 0x43, 0xbc, 0x02, 0x26, 0x8f, 0x70, 1537 0x2d, 0x00, 0xa9, 0xc0, 0x67, 0x06, 0x02, 0xba, 0xbc, 0xe3, 0x1c, 0xda, 0xe9, 0xb7, 0x77, 0xa7, 1538 0xf3, 0x30, 0xdd, 0x51, 0xc1, 0x9e, 0xdf, 0xf1, 0xaa, 0xc1, 0xd6, 0x8a, 0x7c, 0x8c, 0x71, 0xa0, 1539 0x58, 0xc4, 0xa9, 0x59, 0x49, 0x70, 0xca, 0x1d, 0xd4, 0xab, 0x0f, 0x3a, 0x57, 0xc9, 0xa4, 0xe0, 1540 0xd9, 0x4a, 0x82, 0x77, 0x14, 0xe4, 0x25, 0x39, 0xc7, 0x8d, 0x3c, 0x2b, 0xba, 0x89, 0x43, 0x3b, 1541 0x47, 0x36, 0xd1, 0x77, 0xaf, 0x48, 0x34, 0xd7, 0xdb, 0x24, 0x3b, 0x3c, 0x48, 0x43, 0xf5, 0x8e, 1542 0xe3, 0x9d, 0x5d, 0x4d, 0xee, 0xe3, 0x8a, 0x51, 0x8c, 0x6b, 0xc9, 0x14, 0x70, 0xe3, 0xe0, 0xeb, 1543 0x82, 0xf4, 0xb6, 0x71, 0xf2, 0x21, 0x2e, 0x87, 0x0a, 0x60, 0x16, 0xf1, 0xc0, 0xa9, 0x5c, 0x3b, 1544 0x5a, 0xb0, 0xe4, 0x19, 0x6e, 0x1a, 0x5f, 0xd2, 0x90, 0x69, 0x43, 0x85, 0x04, 0x4e, 0x5f, 0x24, 1545 0x90, 0x00, 0x8d, 0x81, 0xcf, 0xcd, 0x85, 0x53, 0xfd, 0x0f, 0x91, 0xdf, 0x32, 0xbe, 0x1c, 0x33, 1546 0x6d, 0xa6, 0x12, 0xf8, 0xe7, 0xe9, 0xf0, 0xc4, 0xce, 0x92, 0x31, 0xae, 0x6b, 0xe1, 0x7f, 0x09, 1547 0xa9, 0xae, 0xfd, 0x89, 0x9d, 0x9a, 0x75, 0xa9, 0x7d, 0x49, 0xe2, 0xa7, 0x16, 0x9c, 0x5a, 0xce, 1548 0xab, 0xe9, 0xad, 0x95, 0x6e, 0x4e, 0x70, 0x75, 0x3b, 0x4e, 0x72, 0x1f, 0x57, 0xd3, 0x93, 0x53, 1549 0x23, 0xa8, 0x14, 0xca, 0xd8, 0x1f, 0xf6, 0xdf, 0xdf, 0x16, 0xa7, 0xfc, 0x99, 0xf8, 0x4c, 0x28, 1550 0xd3, 0x7d, 0x0f, 0x1f, 0x15, 0xa9, 0x92, 0x0a, 0x3e, 0x1c, 0x7d, 0x32, 0x7e, 0xf0, 0x74, 0x72, 1551 0xd6, 0xd8, 0x23, 0xc7, 0xb8, 0xf2, 0x64, 0x3a, 0x7a, 0x3c, 0x7e, 0x4e, 0xa7, 0x9f, 0x4e, 0x9e, 1552 0x37, 0xd0, 0xe0, 0x2f, 0x84, 0x9d, 0x3c, 0xba, 0x51, 0x7e, 0x9b, 0x9d, 0x82, 0x5a, 0x46, 0x3e, 1553 0x90, 0x67, 0xf8, 0xf8, 0xd4, 0x28, 0x60, 0x8b, 0x9c, 0xd0, 0xa4, 0xb5, 0xfb, 0x62, 0xc5, 0x88, 1554 0x07, 0x2f, 0x12, 0xd0, 0xa6, 0xd9, 0xbe, 0xb2, 0xaf, 0xa5, 0xe0, 0x1a, 0xba, 0x7b, 0x3d, 0xf4, 1555 0x01, 0x22, 0x09, 0xae, 0x8f, 0xc1, 0xf8, 0x17, 0xff, 0xa3, 0x70, 0xf7, 0xeb, 0x5f, 0xff, 0xf8, 1556 0xbe, 0x74, 0xd2, 0xbd, 0xbd, 0x73, 0x31, 0xdf, 0xcb, 0xbf, 0x40, 0x7d, 0x0f, 0xbd, 0x3f, 0x7c, 1557 0xed, 0xc7, 0x75, 0x0b, 0xbd, 0x5c, 0xb7, 0xd0, 0x2f, 0xeb, 0x16, 0xfa, 0x7d, 0xdd, 0x42, 0xdf, 1558 0x20, 0x34, 0xbb, 0x69, 0xdd, 0xbc, 0xfb, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x09, 0x10, 1559 0x6b, 0x40, 0x06, 0x00, 0x00, 1560} 1561