mirror of https://github.com/status-im/consul.git
1509 lines
43 KiB
Go
1509 lines
43 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: envoy/api/v2/rds.proto
|
|
|
|
package v2
|
|
|
|
import (
|
|
bytes "bytes"
|
|
context "context"
|
|
fmt "fmt"
|
|
io "io"
|
|
math "math"
|
|
|
|
_ "github.com/envoyproxy/protoc-gen-validate/validate"
|
|
_ "github.com/gogo/googleapis/google/api"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
types "github.com/gogo/protobuf/types"
|
|
grpc "google.golang.org/grpc"
|
|
|
|
core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
|
|
route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// [#comment:next free field: 10]
|
|
type RouteConfiguration struct {
|
|
// The name of the route configuration. For example, it might match
|
|
// :ref:`route_config_name
|
|
// <envoy_api_field_config.filter.network.http_connection_manager.v2.Rds.route_config_name>` in
|
|
// :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`.
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
// An array of virtual hosts that make up the route table.
|
|
VirtualHosts []route.VirtualHost `protobuf:"bytes,2,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts"`
|
|
// An array of virtual hosts will be dynamically loaded via the VHDS API.
|
|
// Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used
|
|
// for a base routing table or for infrequently changing virtual hosts. *vhds* is used for
|
|
// on-demand discovery of virtual hosts. The contents of these two fields will be merged to
|
|
// generate a routing table for a given RouteConfiguration, with *vhds* derived configuration
|
|
// taking precedence.
|
|
// [#not-implemented-hide:]
|
|
Vhds *Vhds `protobuf:"bytes,9,opt,name=vhds,proto3" json:"vhds,omitempty"`
|
|
// Optionally specifies a list of HTTP headers that the connection manager
|
|
// will consider to be internal only. If they are found on external requests they will be cleaned
|
|
// prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
|
|
// information.
|
|
InternalOnlyHeaders []string `protobuf:"bytes,3,rep,name=internal_only_headers,json=internalOnlyHeaders,proto3" json:"internal_only_headers,omitempty"`
|
|
// Specifies a list of HTTP headers that should be added to each response that
|
|
// the connection manager encodes. Headers specified at this level are applied
|
|
// after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
|
|
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
|
|
// header value syntax, see the documentation on :ref:`custom request headers
|
|
// <config_http_conn_man_headers_custom_request_headers>`.
|
|
ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
|
|
// Specifies a list of HTTP headers that should be removed from each response
|
|
// that the connection manager encodes.
|
|
ResponseHeadersToRemove []string `protobuf:"bytes,5,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"`
|
|
// Specifies a list of HTTP headers that should be added to each request
|
|
// routed by the HTTP connection manager. Headers specified at this level are
|
|
// applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
|
|
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
|
|
// header value syntax, see the documentation on :ref:`custom request headers
|
|
// <config_http_conn_man_headers_custom_request_headers>`.
|
|
RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
|
|
// Specifies a list of HTTP headers that should be removed from each request
|
|
// routed by the HTTP connection manager.
|
|
RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"`
|
|
// An optional boolean that specifies whether the clusters that the route
|
|
// table refers to will be validated by the cluster manager. If set to true
|
|
// and a route refers to a non-existent cluster, the route table will not
|
|
// load. If set to false and a route refers to a non-existent cluster, the
|
|
// route table will load and the router filter will return a 404 if the route
|
|
// is selected at runtime. This setting defaults to true if the route table
|
|
// is statically defined via the :ref:`route_config
|
|
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.route_config>`
|
|
// option. This setting default to false if the route table is loaded dynamically via the
|
|
// :ref:`rds
|
|
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.rds>`
|
|
// option. Users may which to override the default behavior in certain cases (for example when
|
|
// using CDS with a static route table).
|
|
ValidateClusters *types.BoolValue `protobuf:"bytes,7,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RouteConfiguration) Reset() { *m = RouteConfiguration{} }
|
|
func (m *RouteConfiguration) String() string { return proto.CompactTextString(m) }
|
|
func (*RouteConfiguration) ProtoMessage() {}
|
|
func (*RouteConfiguration) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78812f46dcff924a, []int{0}
|
|
}
|
|
func (m *RouteConfiguration) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RouteConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RouteConfiguration.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RouteConfiguration) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RouteConfiguration.Merge(m, src)
|
|
}
|
|
func (m *RouteConfiguration) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RouteConfiguration) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RouteConfiguration.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RouteConfiguration proto.InternalMessageInfo
|
|
|
|
func (m *RouteConfiguration) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetVirtualHosts() []route.VirtualHost {
|
|
if m != nil {
|
|
return m.VirtualHosts
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetVhds() *Vhds {
|
|
if m != nil {
|
|
return m.Vhds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetInternalOnlyHeaders() []string {
|
|
if m != nil {
|
|
return m.InternalOnlyHeaders
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetResponseHeadersToAdd() []*core.HeaderValueOption {
|
|
if m != nil {
|
|
return m.ResponseHeadersToAdd
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetResponseHeadersToRemove() []string {
|
|
if m != nil {
|
|
return m.ResponseHeadersToRemove
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetRequestHeadersToAdd() []*core.HeaderValueOption {
|
|
if m != nil {
|
|
return m.RequestHeadersToAdd
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetRequestHeadersToRemove() []string {
|
|
if m != nil {
|
|
return m.RequestHeadersToRemove
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) GetValidateClusters() *types.BoolValue {
|
|
if m != nil {
|
|
return m.ValidateClusters
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// [#not-implemented-hide:]
|
|
type Vhds struct {
|
|
// Configuration source specifier for VHDS.
|
|
ConfigSource core.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Vhds) Reset() { *m = Vhds{} }
|
|
func (m *Vhds) String() string { return proto.CompactTextString(m) }
|
|
func (*Vhds) ProtoMessage() {}
|
|
func (*Vhds) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78812f46dcff924a, []int{1}
|
|
}
|
|
func (m *Vhds) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Vhds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Vhds.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Vhds) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Vhds.Merge(m, src)
|
|
}
|
|
func (m *Vhds) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Vhds) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Vhds.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Vhds proto.InternalMessageInfo
|
|
|
|
func (m *Vhds) GetConfigSource() core.ConfigSource {
|
|
if m != nil {
|
|
return m.ConfigSource
|
|
}
|
|
return core.ConfigSource{}
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*RouteConfiguration)(nil), "envoy.api.v2.RouteConfiguration")
|
|
proto.RegisterType((*Vhds)(nil), "envoy.api.v2.Vhds")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("envoy/api/v2/rds.proto", fileDescriptor_78812f46dcff924a) }
|
|
|
|
var fileDescriptor_78812f46dcff924a = []byte{
|
|
// 673 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xbf, 0x6f, 0xd3, 0x40,
|
|
0x18, 0xed, 0x25, 0xe9, 0xaf, 0x4b, 0x8a, 0xda, 0xeb, 0xaf, 0x34, 0xa0, 0x24, 0x0a, 0x05, 0x45,
|
|
0x0c, 0x36, 0x32, 0x13, 0xed, 0x44, 0x5a, 0x41, 0xc5, 0xd2, 0xca, 0x2d, 0x99, 0x10, 0xd6, 0xd5,
|
|
0xbe, 0xc6, 0x96, 0x5c, 0x7f, 0xe6, 0xee, 0x6c, 0xc8, 0x0a, 0x0b, 0x62, 0x84, 0x7f, 0x82, 0xbf,
|
|
0x81, 0x05, 0xc6, 0x8e, 0x48, 0xec, 0x08, 0x05, 0x06, 0xf8, 0x2f, 0x90, 0xcf, 0x36, 0xc4, 0x4d,
|
|
0x61, 0x40, 0x5d, 0xa2, 0xcb, 0xbd, 0xf7, 0xbe, 0xef, 0x7d, 0x77, 0xef, 0x8c, 0xd7, 0x58, 0x10,
|
|
0xc3, 0x50, 0xa7, 0xa1, 0xa7, 0xc7, 0x86, 0xce, 0x1d, 0xa1, 0x85, 0x1c, 0x24, 0x90, 0x9a, 0xda,
|
|
0xd7, 0x68, 0xe8, 0x69, 0xb1, 0xd1, 0xb8, 0x56, 0x60, 0xd9, 0xc0, 0x99, 0x7e, 0x4c, 0x05, 0x4b,
|
|
0xb9, 0x8d, 0x1b, 0x93, 0xa8, 0x0d, 0xc1, 0x89, 0x37, 0xb0, 0x04, 0x44, 0xdc, 0xce, 0x69, 0xc5,
|
|
0x22, 0x8e, 0x27, 0x6c, 0x88, 0x19, 0x1f, 0x66, 0x68, 0xb3, 0x68, 0x04, 0x22, 0xc9, 0xd2, 0xdf,
|
|
0x5c, 0x3d, 0x00, 0x18, 0xf8, 0x4c, 0x11, 0x68, 0x10, 0x80, 0xa4, 0xd2, 0x83, 0x40, 0xe4, 0xea,
|
|
0x0c, 0x55, 0xff, 0x8e, 0xa3, 0x13, 0xfd, 0x19, 0xa7, 0x61, 0xc8, 0x78, 0x8e, 0xaf, 0xc7, 0xd4,
|
|
0xf7, 0x1c, 0x2a, 0x99, 0x9e, 0x2f, 0x32, 0x60, 0x65, 0x00, 0x03, 0x50, 0x4b, 0x3d, 0x59, 0xa5,
|
|
0xbb, 0x9d, 0x6f, 0x15, 0x4c, 0xcc, 0xa4, 0xf9, 0x8e, 0x9a, 0x23, 0xe2, 0xaa, 0x19, 0x21, 0xb8,
|
|
0x12, 0xd0, 0x53, 0x56, 0x47, 0x6d, 0xd4, 0x9d, 0x37, 0xd5, 0x9a, 0x3c, 0xc4, 0x0b, 0xb1, 0xc7,
|
|
0x65, 0x44, 0x7d, 0xcb, 0x05, 0x21, 0x45, 0xbd, 0xd4, 0x2e, 0x77, 0xab, 0x46, 0x4b, 0x1b, 0x3f,
|
|
0x40, 0x2d, 0x9d, 0xa4, 0x9f, 0x12, 0xf7, 0x40, 0xc8, 0x5e, 0xe5, 0xec, 0x4b, 0x6b, 0xca, 0xac,
|
|
0xc5, 0x7f, 0xb6, 0x04, 0xb9, 0x89, 0x2b, 0xb1, 0xeb, 0x88, 0xfa, 0x7c, 0x1b, 0x75, 0xab, 0x06,
|
|
0x29, 0x96, 0xe8, 0xbb, 0x8e, 0x30, 0x15, 0x4e, 0x0c, 0xbc, 0xea, 0x05, 0x92, 0xf1, 0x80, 0xfa,
|
|
0x16, 0x04, 0xfe, 0xd0, 0x72, 0x19, 0x75, 0x18, 0x17, 0xf5, 0x72, 0xbb, 0xdc, 0x9d, 0x37, 0x97,
|
|
0x73, 0x70, 0x3f, 0xf0, 0x87, 0x7b, 0x29, 0x44, 0x5c, 0xbc, 0xce, 0x99, 0x08, 0x21, 0x10, 0x2c,
|
|
0xa7, 0x5b, 0x12, 0x2c, 0xea, 0x38, 0xf5, 0x8a, 0x72, 0xbc, 0x59, 0x6c, 0x97, 0x5c, 0xa3, 0x96,
|
|
0x8a, 0xfb, 0xd4, 0x8f, 0xd8, 0x7e, 0x98, 0x1c, 0x41, 0xaf, 0xfa, 0xfe, 0xe7, 0xc7, 0xf2, 0xcc,
|
|
0x1b, 0x54, 0x5e, 0xfc, 0x31, 0x6b, 0xae, 0xe4, 0x15, 0xb3, 0x26, 0x47, 0x70, 0xcf, 0x71, 0xc8,
|
|
0x36, 0x6e, 0x5c, 0xd4, 0x89, 0xb3, 0x53, 0x88, 0x59, 0x7d, 0x5a, 0x59, 0x5c, 0x9f, 0x50, 0x9a,
|
|
0x0a, 0x26, 0x27, 0x78, 0x8d, 0xb3, 0xa7, 0x11, 0x13, 0xf2, 0xbc, 0xcb, 0x99, 0xff, 0x75, 0xb9,
|
|
0x9c, 0x15, 0x2c, 0x98, 0xbc, 0x8b, 0x37, 0x2e, 0xe8, 0x93, 0x79, 0x9c, 0x53, 0x1e, 0xd7, 0xce,
|
|
0xeb, 0x32, 0x8b, 0x0f, 0xf0, 0x52, 0x1e, 0x22, 0xcb, 0xf6, 0x23, 0x21, 0x93, 0x93, 0x9f, 0x55,
|
|
0x57, 0xd6, 0xd0, 0xd2, 0x1c, 0x6a, 0x79, 0x0e, 0xb5, 0x1e, 0x80, 0xaf, 0x9c, 0x99, 0x8b, 0xb9,
|
|
0x68, 0x27, 0xd3, 0x74, 0x1e, 0xe3, 0x4a, 0x72, 0xa9, 0xe4, 0x08, 0x2f, 0x14, 0xde, 0x8b, 0xca,
|
|
0xd7, 0x44, 0x84, 0xd4, 0xa8, 0x69, 0x1e, 0x0f, 0x15, 0xad, 0x77, 0x25, 0x89, 0x50, 0x32, 0xe9,
|
|
0xf4, 0x6b, 0x54, 0x5a, 0x44, 0x66, 0xcd, 0x1e, 0x43, 0x8d, 0x0f, 0x25, 0xbc, 0xaa, 0x32, 0xbc,
|
|
0x9b, 0xbf, 0xb4, 0x43, 0xc6, 0x63, 0xcf, 0x66, 0xe4, 0x11, 0xae, 0x1d, 0x4a, 0xce, 0xe8, 0xa9,
|
|
0x82, 0x05, 0x69, 0x16, 0x1b, 0xfd, 0xe6, 0x9b, 0xe9, 0xfc, 0x8d, 0xd6, 0x5f, 0xf1, 0xf4, 0x0e,
|
|
0x3b, 0x53, 0x5d, 0x74, 0x1b, 0x91, 0x27, 0xb8, 0xba, 0xcb, 0x7c, 0x49, 0xb3, 0xaa, 0xd7, 0xcf,
|
|
0xa9, 0x12, 0x68, 0xa2, 0xf4, 0xe6, 0xbf, 0x49, 0x85, 0xfa, 0x80, 0xab, 0xf7, 0x99, 0xb4, 0xdd,
|
|
0xcb, 0x72, 0xdd, 0x7a, 0xf1, 0xf9, 0xfb, 0xdb, 0xd2, 0x46, 0x67, 0xa5, 0xf0, 0x39, 0xda, 0x52,
|
|
0x4f, 0x55, 0x6c, 0xa1, 0x5b, 0xc6, 0x4b, 0x84, 0xaf, 0x8e, 0x3d, 0xd9, 0x89, 0x73, 0x74, 0xf0,
|
|
0x92, 0x32, 0xdc, 0x1f, 0x7f, 0xc3, 0x97, 0x3d, 0x76, 0x6f, 0xfb, 0xdd, 0xa8, 0x89, 0xce, 0x46,
|
|
0x4d, 0xf4, 0x69, 0xd4, 0x44, 0x5f, 0x47, 0x4d, 0x84, 0x1b, 0x1e, 0xa4, 0xfa, 0x90, 0xc3, 0xf3,
|
|
0x61, 0xa1, 0x54, 0x6f, 0xce, 0x74, 0xc4, 0x41, 0x12, 0xbe, 0x03, 0xf4, 0x0a, 0xa1, 0xe3, 0x19,
|
|
0x15, 0xc4, 0x3b, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x13, 0x2b, 0xc3, 0xe7, 0x05, 0x00,
|
|
0x00,
|
|
}
|
|
|
|
func (this *RouteConfiguration) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*RouteConfiguration)
|
|
if !ok {
|
|
that2, ok := that.(RouteConfiguration)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Name != that1.Name {
|
|
return false
|
|
}
|
|
if len(this.VirtualHosts) != len(that1.VirtualHosts) {
|
|
return false
|
|
}
|
|
for i := range this.VirtualHosts {
|
|
if !this.VirtualHosts[i].Equal(&that1.VirtualHosts[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if !this.Vhds.Equal(that1.Vhds) {
|
|
return false
|
|
}
|
|
if len(this.InternalOnlyHeaders) != len(that1.InternalOnlyHeaders) {
|
|
return false
|
|
}
|
|
for i := range this.InternalOnlyHeaders {
|
|
if this.InternalOnlyHeaders[i] != that1.InternalOnlyHeaders[i] {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.ResponseHeadersToAdd) != len(that1.ResponseHeadersToAdd) {
|
|
return false
|
|
}
|
|
for i := range this.ResponseHeadersToAdd {
|
|
if !this.ResponseHeadersToAdd[i].Equal(that1.ResponseHeadersToAdd[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.ResponseHeadersToRemove) != len(that1.ResponseHeadersToRemove) {
|
|
return false
|
|
}
|
|
for i := range this.ResponseHeadersToRemove {
|
|
if this.ResponseHeadersToRemove[i] != that1.ResponseHeadersToRemove[i] {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.RequestHeadersToAdd) != len(that1.RequestHeadersToAdd) {
|
|
return false
|
|
}
|
|
for i := range this.RequestHeadersToAdd {
|
|
if !this.RequestHeadersToAdd[i].Equal(that1.RequestHeadersToAdd[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.RequestHeadersToRemove) != len(that1.RequestHeadersToRemove) {
|
|
return false
|
|
}
|
|
for i := range this.RequestHeadersToRemove {
|
|
if this.RequestHeadersToRemove[i] != that1.RequestHeadersToRemove[i] {
|
|
return false
|
|
}
|
|
}
|
|
if !this.ValidateClusters.Equal(that1.ValidateClusters) {
|
|
return false
|
|
}
|
|
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *Vhds) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*Vhds)
|
|
if !ok {
|
|
that2, ok := that.(Vhds)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.ConfigSource.Equal(&that1.ConfigSource) {
|
|
return false
|
|
}
|
|
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// RouteDiscoveryServiceClient is the client API for RouteDiscoveryService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type RouteDiscoveryServiceClient interface {
|
|
StreamRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_StreamRoutesClient, error)
|
|
DeltaRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_DeltaRoutesClient, error)
|
|
FetchRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error)
|
|
}
|
|
|
|
type routeDiscoveryServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewRouteDiscoveryServiceClient(cc *grpc.ClientConn) RouteDiscoveryServiceClient {
|
|
return &routeDiscoveryServiceClient{cc}
|
|
}
|
|
|
|
func (c *routeDiscoveryServiceClient) StreamRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_StreamRoutesClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_RouteDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.RouteDiscoveryService/StreamRoutes", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &routeDiscoveryServiceStreamRoutesClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type RouteDiscoveryService_StreamRoutesClient interface {
|
|
Send(*DiscoveryRequest) error
|
|
Recv() (*DiscoveryResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type routeDiscoveryServiceStreamRoutesClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceStreamRoutesClient) Send(m *DiscoveryRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceStreamRoutesClient) Recv() (*DiscoveryResponse, error) {
|
|
m := new(DiscoveryResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *routeDiscoveryServiceClient) DeltaRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_DeltaRoutesClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_RouteDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.RouteDiscoveryService/DeltaRoutes", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &routeDiscoveryServiceDeltaRoutesClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type RouteDiscoveryService_DeltaRoutesClient interface {
|
|
Send(*DeltaDiscoveryRequest) error
|
|
Recv() (*DeltaDiscoveryResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type routeDiscoveryServiceDeltaRoutesClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceDeltaRoutesClient) Send(m *DeltaDiscoveryRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceDeltaRoutesClient) Recv() (*DeltaDiscoveryResponse, error) {
|
|
m := new(DeltaDiscoveryResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *routeDiscoveryServiceClient) FetchRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) {
|
|
out := new(DiscoveryResponse)
|
|
err := c.cc.Invoke(ctx, "/envoy.api.v2.RouteDiscoveryService/FetchRoutes", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// RouteDiscoveryServiceServer is the server API for RouteDiscoveryService service.
|
|
type RouteDiscoveryServiceServer interface {
|
|
StreamRoutes(RouteDiscoveryService_StreamRoutesServer) error
|
|
DeltaRoutes(RouteDiscoveryService_DeltaRoutesServer) error
|
|
FetchRoutes(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error)
|
|
}
|
|
|
|
func RegisterRouteDiscoveryServiceServer(s *grpc.Server, srv RouteDiscoveryServiceServer) {
|
|
s.RegisterService(&_RouteDiscoveryService_serviceDesc, srv)
|
|
}
|
|
|
|
func _RouteDiscoveryService_StreamRoutes_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(RouteDiscoveryServiceServer).StreamRoutes(&routeDiscoveryServiceStreamRoutesServer{stream})
|
|
}
|
|
|
|
type RouteDiscoveryService_StreamRoutesServer interface {
|
|
Send(*DiscoveryResponse) error
|
|
Recv() (*DiscoveryRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type routeDiscoveryServiceStreamRoutesServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceStreamRoutesServer) Send(m *DiscoveryResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceStreamRoutesServer) Recv() (*DiscoveryRequest, error) {
|
|
m := new(DiscoveryRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _RouteDiscoveryService_DeltaRoutes_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(RouteDiscoveryServiceServer).DeltaRoutes(&routeDiscoveryServiceDeltaRoutesServer{stream})
|
|
}
|
|
|
|
type RouteDiscoveryService_DeltaRoutesServer interface {
|
|
Send(*DeltaDiscoveryResponse) error
|
|
Recv() (*DeltaDiscoveryRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type routeDiscoveryServiceDeltaRoutesServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceDeltaRoutesServer) Send(m *DeltaDiscoveryResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *routeDiscoveryServiceDeltaRoutesServer) Recv() (*DeltaDiscoveryRequest, error) {
|
|
m := new(DeltaDiscoveryRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _RouteDiscoveryService_FetchRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DiscoveryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RouteDiscoveryServiceServer).FetchRoutes(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/envoy.api.v2.RouteDiscoveryService/FetchRoutes",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RouteDiscoveryServiceServer).FetchRoutes(ctx, req.(*DiscoveryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _RouteDiscoveryService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "envoy.api.v2.RouteDiscoveryService",
|
|
HandlerType: (*RouteDiscoveryServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "FetchRoutes",
|
|
Handler: _RouteDiscoveryService_FetchRoutes_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "StreamRoutes",
|
|
Handler: _RouteDiscoveryService_StreamRoutes_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
{
|
|
StreamName: "DeltaRoutes",
|
|
Handler: _RouteDiscoveryService_DeltaRoutes_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "envoy/api/v2/rds.proto",
|
|
}
|
|
|
|
// VirtualHostDiscoveryServiceClient is the client API for VirtualHostDiscoveryService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type VirtualHostDiscoveryServiceClient interface {
|
|
DeltaVirtualHosts(ctx context.Context, opts ...grpc.CallOption) (VirtualHostDiscoveryService_DeltaVirtualHostsClient, error)
|
|
}
|
|
|
|
type virtualHostDiscoveryServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewVirtualHostDiscoveryServiceClient(cc *grpc.ClientConn) VirtualHostDiscoveryServiceClient {
|
|
return &virtualHostDiscoveryServiceClient{cc}
|
|
}
|
|
|
|
func (c *virtualHostDiscoveryServiceClient) DeltaVirtualHosts(ctx context.Context, opts ...grpc.CallOption) (VirtualHostDiscoveryService_DeltaVirtualHostsClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_VirtualHostDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.VirtualHostDiscoveryService/DeltaVirtualHosts", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &virtualHostDiscoveryServiceDeltaVirtualHostsClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type VirtualHostDiscoveryService_DeltaVirtualHostsClient interface {
|
|
Send(*DeltaDiscoveryRequest) error
|
|
Recv() (*DeltaDiscoveryResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type virtualHostDiscoveryServiceDeltaVirtualHostsClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *virtualHostDiscoveryServiceDeltaVirtualHostsClient) Send(m *DeltaDiscoveryRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *virtualHostDiscoveryServiceDeltaVirtualHostsClient) Recv() (*DeltaDiscoveryResponse, error) {
|
|
m := new(DeltaDiscoveryResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// VirtualHostDiscoveryServiceServer is the server API for VirtualHostDiscoveryService service.
|
|
type VirtualHostDiscoveryServiceServer interface {
|
|
DeltaVirtualHosts(VirtualHostDiscoveryService_DeltaVirtualHostsServer) error
|
|
}
|
|
|
|
func RegisterVirtualHostDiscoveryServiceServer(s *grpc.Server, srv VirtualHostDiscoveryServiceServer) {
|
|
s.RegisterService(&_VirtualHostDiscoveryService_serviceDesc, srv)
|
|
}
|
|
|
|
func _VirtualHostDiscoveryService_DeltaVirtualHosts_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(VirtualHostDiscoveryServiceServer).DeltaVirtualHosts(&virtualHostDiscoveryServiceDeltaVirtualHostsServer{stream})
|
|
}
|
|
|
|
type VirtualHostDiscoveryService_DeltaVirtualHostsServer interface {
|
|
Send(*DeltaDiscoveryResponse) error
|
|
Recv() (*DeltaDiscoveryRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type virtualHostDiscoveryServiceDeltaVirtualHostsServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *virtualHostDiscoveryServiceDeltaVirtualHostsServer) Send(m *DeltaDiscoveryResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *virtualHostDiscoveryServiceDeltaVirtualHostsServer) Recv() (*DeltaDiscoveryRequest, error) {
|
|
m := new(DeltaDiscoveryRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
var _VirtualHostDiscoveryService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "envoy.api.v2.VirtualHostDiscoveryService",
|
|
HandlerType: (*VirtualHostDiscoveryServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "DeltaVirtualHosts",
|
|
Handler: _VirtualHostDiscoveryService_DeltaVirtualHosts_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "envoy/api/v2/rds.proto",
|
|
}
|
|
|
|
func (m *RouteConfiguration) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RouteConfiguration) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Name) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRds(dAtA, i, uint64(len(m.Name)))
|
|
i += copy(dAtA[i:], m.Name)
|
|
}
|
|
if len(m.VirtualHosts) > 0 {
|
|
for _, msg := range m.VirtualHosts {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintRds(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
if len(m.InternalOnlyHeaders) > 0 {
|
|
for _, s := range m.InternalOnlyHeaders {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
dAtA[i] = uint8(l)
|
|
i++
|
|
i += copy(dAtA[i:], s)
|
|
}
|
|
}
|
|
if len(m.ResponseHeadersToAdd) > 0 {
|
|
for _, msg := range m.ResponseHeadersToAdd {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintRds(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
if len(m.ResponseHeadersToRemove) > 0 {
|
|
for _, s := range m.ResponseHeadersToRemove {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
dAtA[i] = uint8(l)
|
|
i++
|
|
i += copy(dAtA[i:], s)
|
|
}
|
|
}
|
|
if len(m.RequestHeadersToAdd) > 0 {
|
|
for _, msg := range m.RequestHeadersToAdd {
|
|
dAtA[i] = 0x32
|
|
i++
|
|
i = encodeVarintRds(dAtA, i, uint64(msg.Size()))
|
|
n, err := msg.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n
|
|
}
|
|
}
|
|
if m.ValidateClusters != nil {
|
|
dAtA[i] = 0x3a
|
|
i++
|
|
i = encodeVarintRds(dAtA, i, uint64(m.ValidateClusters.Size()))
|
|
n1, err := m.ValidateClusters.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n1
|
|
}
|
|
if len(m.RequestHeadersToRemove) > 0 {
|
|
for _, s := range m.RequestHeadersToRemove {
|
|
dAtA[i] = 0x42
|
|
i++
|
|
l = len(s)
|
|
for l >= 1<<7 {
|
|
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
l >>= 7
|
|
i++
|
|
}
|
|
dAtA[i] = uint8(l)
|
|
i++
|
|
i += copy(dAtA[i:], s)
|
|
}
|
|
}
|
|
if m.Vhds != nil {
|
|
dAtA[i] = 0x4a
|
|
i++
|
|
i = encodeVarintRds(dAtA, i, uint64(m.Vhds.Size()))
|
|
n2, err := m.Vhds.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n2
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Vhds) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Vhds) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintRds(dAtA, i, uint64(m.ConfigSource.Size()))
|
|
n3, err := m.ConfigSource.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n3
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintRds(dAtA []byte, offset int, v uint64) int {
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return offset + 1
|
|
}
|
|
func (m *RouteConfiguration) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
if len(m.VirtualHosts) > 0 {
|
|
for _, e := range m.VirtualHosts {
|
|
l = e.Size()
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
}
|
|
if len(m.InternalOnlyHeaders) > 0 {
|
|
for _, s := range m.InternalOnlyHeaders {
|
|
l = len(s)
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
}
|
|
if len(m.ResponseHeadersToAdd) > 0 {
|
|
for _, e := range m.ResponseHeadersToAdd {
|
|
l = e.Size()
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
}
|
|
if len(m.ResponseHeadersToRemove) > 0 {
|
|
for _, s := range m.ResponseHeadersToRemove {
|
|
l = len(s)
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
}
|
|
if len(m.RequestHeadersToAdd) > 0 {
|
|
for _, e := range m.RequestHeadersToAdd {
|
|
l = e.Size()
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
}
|
|
if m.ValidateClusters != nil {
|
|
l = m.ValidateClusters.Size()
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
if len(m.RequestHeadersToRemove) > 0 {
|
|
for _, s := range m.RequestHeadersToRemove {
|
|
l = len(s)
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
}
|
|
if m.Vhds != nil {
|
|
l = m.Vhds.Size()
|
|
n += 1 + l + sovRds(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Vhds) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = m.ConfigSource.Size()
|
|
n += 1 + l + sovRds(uint64(l))
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovRds(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozRds(x uint64) (n int) {
|
|
return sovRds(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *RouteConfiguration) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RouteConfiguration: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RouteConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VirtualHosts", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.VirtualHosts = append(m.VirtualHosts, route.VirtualHost{})
|
|
if err := m.VirtualHosts[len(m.VirtualHosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field InternalOnlyHeaders", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.InternalOnlyHeaders = append(m.InternalOnlyHeaders, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeadersToAdd", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ResponseHeadersToAdd = append(m.ResponseHeadersToAdd, &core.HeaderValueOption{})
|
|
if err := m.ResponseHeadersToAdd[len(m.ResponseHeadersToAdd)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeadersToRemove", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ResponseHeadersToRemove = append(m.ResponseHeadersToRemove, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToAdd", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.RequestHeadersToAdd = append(m.RequestHeadersToAdd, &core.HeaderValueOption{})
|
|
if err := m.RequestHeadersToAdd[len(m.RequestHeadersToAdd)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValidateClusters", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ValidateClusters == nil {
|
|
m.ValidateClusters = &types.BoolValue{}
|
|
}
|
|
if err := m.ValidateClusters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 8:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToRemove", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.RequestHeadersToRemove = append(m.RequestHeadersToRemove, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 9:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Vhds", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Vhds == nil {
|
|
m.Vhds = &Vhds{}
|
|
}
|
|
if err := m.Vhds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRds(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Vhds) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Vhds: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Vhds: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ConfigSource", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := m.ConfigSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRds(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthRds
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipRds(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthRds
|
|
}
|
|
iNdEx += length
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthRds
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRds
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipRds(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthRds
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthRds = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowRds = fmt.Errorf("proto: integer overflow")
|
|
)
|