xds client: Updated v3 type for http connection manager (#4137)

This commit is contained in:
Pradeep Mamillapalli 2021-01-07 13:06:14 -05:00 коммит произвёл GitHub
Родитель f4a20d2f41
Коммит 829919d572
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -31,6 +31,7 @@ import (
v3httppb "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3" v3httppb "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3"
v3tlspb "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" v3tlspb "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
anypb "github.com/golang/protobuf/ptypes/any" anypb "github.com/golang/protobuf/ptypes/any"
wrapperspb "github.com/golang/protobuf/ptypes/wrappers" wrapperspb "github.com/golang/protobuf/ptypes/wrappers"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
@ -87,14 +88,11 @@ func (s) TestUnmarshalListener_ClientSide(t *testing.T) {
}, },
}, },
} }
mcm, _ := proto.Marshal(cm) mcm, _ := ptypes.MarshalAny(cm)
lis := &v3listenerpb.Listener{ lis := &v3listenerpb.Listener{
Name: v3LDSTarget, Name: v3LDSTarget,
ApiListener: &v3listenerpb.ApiListener{ ApiListener: &v3listenerpb.ApiListener{
ApiListener: &anypb.Any{ ApiListener: mcm,
TypeUrl: version.V3HTTPConnManagerURL,
Value: mcm,
},
}, },
} }
mLis, _ := proto.Marshal(lis) mLis, _ := proto.Marshal(lis)

Просмотреть файл

@ -45,7 +45,7 @@ const (
V3RouteConfigURL = "type.googleapis.com/envoy.config.route.v3.RouteConfiguration" V3RouteConfigURL = "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
V3ClusterURL = "type.googleapis.com/envoy.config.cluster.v3.Cluster" V3ClusterURL = "type.googleapis.com/envoy.config.cluster.v3.Cluster"
V3EndpointsURL = "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment" V3EndpointsURL = "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment"
V3HTTPConnManagerURL = "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v3.HttpConnectionManager" V3HTTPConnManagerURL = "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
V3UpstreamTLSContextURL = "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext" V3UpstreamTLSContextURL = "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext"
V3DownstreamTLSContextURL = "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext" V3DownstreamTLSContextURL = "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext"
) )