Skip to content

Commit

Permalink
Merge pull request #136 from envoyproxy/master
Browse files Browse the repository at this point in the history
all: upgrade Envoy source to v3alpha API. (envoyproxy#9546)
  • Loading branch information
sthagen authored Jan 6, 2020
2 parents 6bbbae1 + 21aa1a7 commit cdc351f
Show file tree
Hide file tree
Showing 1,026 changed files with 10,774 additions and 9,694 deletions.
4 changes: 2 additions & 2 deletions include/envoy/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ envoy_cc_library(
hdrs = ["subscription_factory.h"],
deps = [
":subscription_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
],
)

Expand All @@ -54,7 +54,7 @@ envoy_cc_library(
deps = [
"//include/envoy/stats:stats_macros",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3alpha:pkg_cc_proto",
],
)

Expand Down
5 changes: 3 additions & 2 deletions include/envoy/config/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <string>
#include <vector>

#include "envoy/api/v2/discovery.pb.h"
#include "envoy/common/exception.h"
#include "envoy/common/pure.h"
#include "envoy/service/discovery/v3alpha/discovery.pb.h"
#include "envoy/stats/stats_macros.h"

#include "common/protobuf/protobuf.h"
Expand Down Expand Up @@ -50,7 +50,8 @@ class SubscriptionCallbacks {
* are accepted. Accepted changes have their version_info reflected in subsequent requests.
*/
virtual void
onConfigUpdate(const Protobuf::RepeatedPtrField<envoy::api::v2::Resource>& added_resources,
onConfigUpdate(const Protobuf::RepeatedPtrField<envoy::service::discovery::v3alpha::Resource>&
added_resources,
const Protobuf::RepeatedPtrField<std::string>& removed_resources,
const std::string& system_version_info) PURE;

Expand Down
4 changes: 2 additions & 2 deletions include/envoy/config/subscription_factory.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "envoy/api/v2/core/config_source.pb.h"
#include "envoy/config/core/v3alpha/config_source.pb.h"
#include "envoy/config/subscription.h"
#include "envoy/stats/scope.h"

Expand All @@ -22,7 +22,7 @@ class SubscriptionFactory {
* @return SubscriptionPtr subscription object corresponding for config and type_url.
*/
virtual SubscriptionPtr
subscriptionFromConfigSource(const envoy::api::v2::core::ConfigSource& config,
subscriptionFromConfigSource(const envoy::config::core::v3alpha::ConfigSource& config,
absl::string_view type_url, Stats::Scope& scope,
SubscriptionCallbacks& callbacks) PURE;
};
Expand Down
4 changes: 2 additions & 2 deletions include/envoy/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ envoy_cc_library(
deps = [
":async_client_interface",
"//include/envoy/stats:stats_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
],
)

Expand All @@ -50,7 +50,7 @@ envoy_cc_library(
],
deps = [
"//include/envoy/api:api_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
],
)

Expand Down
6 changes: 3 additions & 3 deletions include/envoy/grpc/async_client_manager.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "envoy/api/v2/core/grpc_service.pb.h"
#include "envoy/config/core/v3alpha/grpc_service.pb.h"
#include "envoy/grpc/async_client.h"
#include "envoy/stats/scope.h"

Expand Down Expand Up @@ -40,8 +40,8 @@ class AsyncClientManager {
* @throws EnvoyException when grpc_service validation fails.
*/
virtual AsyncClientFactoryPtr
factoryForGrpcService(const envoy::api::v2::core::GrpcService& grpc_service, Stats::Scope& scope,
bool skip_cluster_check) PURE;
factoryForGrpcService(const envoy::config::core::v3alpha::GrpcService& grpc_service,
Stats::Scope& scope, bool skip_cluster_check) PURE;
};

using AsyncClientManagerPtr = std::unique_ptr<AsyncClientManager>;
Expand Down
4 changes: 2 additions & 2 deletions include/envoy/grpc/google_grpc_creds.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <memory>

#include "envoy/api/api.h"
#include "envoy/api/v2/core/grpc_service.pb.h"
#include "envoy/common/pure.h"
#include "envoy/config/core/v3alpha/grpc_service.pb.h"

#include "grpcpp/grpcpp.h"

Expand All @@ -31,7 +31,7 @@ class GoogleGrpcCredentialsFactory {
* channel.
*/
virtual std::shared_ptr<grpc::ChannelCredentials>
getChannelCredentials(const envoy::api::v2::core::GrpcService& grpc_service_config,
getChannelCredentials(const envoy::config::core::v3alpha::GrpcService& grpc_service_config,
Api::Api& api) PURE;

/**
Expand Down
2 changes: 1 addition & 1 deletion include/envoy/http/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ envoy_cc_library(
"//include/envoy/event:dispatcher_interface",
"//include/envoy/tracing:http_tracer_interface",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2/route:pkg_cc_proto",
"@envoy_api//envoy/config/route/v3alpha:pkg_cc_proto",
],
)

Expand Down
10 changes: 6 additions & 4 deletions include/envoy/http/async_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <chrono>
#include <memory>

#include "envoy/api/v2/route/route.pb.h"
#include "envoy/config/route/v3alpha/route_components.pb.h"
#include "envoy/event/dispatcher.h"
#include "envoy/http/message.h"
#include "envoy/tracing/http_tracer.h"
Expand Down Expand Up @@ -163,7 +163,8 @@ class AsyncClient {
return *this;
}
StreamOptions& setHashPolicy(
const Protobuf::RepeatedPtrField<envoy::api::v2::route::RouteAction::HashPolicy>& v) {
const Protobuf::RepeatedPtrField<envoy::config::route::v3alpha::RouteAction::HashPolicy>&
v) {
hash_policy = v;
return *this;
}
Expand All @@ -188,7 +189,7 @@ class AsyncClient {
bool send_xff{true};

// Provides the hash policy for hashing load balancing strategies.
Protobuf::RepeatedPtrField<envoy::api::v2::route::RouteAction::HashPolicy> hash_policy;
Protobuf::RepeatedPtrField<envoy::config::route::v3alpha::RouteAction::HashPolicy> hash_policy;
};

/**
Expand All @@ -212,7 +213,8 @@ class AsyncClient {
return *this;
}
RequestOptions& setHashPolicy(
const Protobuf::RepeatedPtrField<envoy::api::v2::route::RouteAction::HashPolicy>& v) {
const Protobuf::RepeatedPtrField<envoy::config::route::v3alpha::RouteAction::HashPolicy>&
v) {
StreamOptions::setHashPolicy(v);
return *this;
}
Expand Down
2 changes: 1 addition & 1 deletion include/envoy/local_info/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ envoy_cc_library(
hdrs = ["local_info.h"],
deps = [
"//include/envoy/network:address_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
],
)
4 changes: 2 additions & 2 deletions include/envoy/local_info/local_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include <string>

#include "envoy/api/v2/core/base.pb.h"
#include "envoy/common/pure.h"
#include "envoy/config/core/v3alpha/base.pb.h"
#include "envoy/network/address.h"

namespace Envoy {
Expand Down Expand Up @@ -39,7 +39,7 @@ class LocalInfo {
/**
* v2 API Node protobuf. This is the full node identity presented to management servers.
*/
virtual const envoy::api::v2::core::Node& node() const PURE;
virtual const envoy::config::core::v3alpha::Node& node() const PURE;
};

using LocalInfoPtr = std::unique_ptr<LocalInfo>;
Expand Down
6 changes: 3 additions & 3 deletions include/envoy/network/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ envoy_cc_library(
deps = [
":address_interface",
":io_handle_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
],
)

Expand Down Expand Up @@ -118,7 +118,7 @@ envoy_cc_library(
":connection_interface",
":listen_socket_interface",
"//include/envoy/stats:stats_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
],
)

Expand All @@ -127,6 +127,6 @@ envoy_cc_library(
hdrs = ["resolver.h"],
deps = [
":address_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
],
)
11 changes: 6 additions & 5 deletions include/envoy/network/listen_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include <tuple>
#include <vector>

#include "envoy/api/v2/core/base.pb.h"
#include "envoy/common/exception.h"
#include "envoy/common/pure.h"
#include "envoy/config/core/v3alpha/base.pb.h"
#include "envoy/network/address.h"
#include "envoy/network/io_handle.h"

Expand Down Expand Up @@ -101,8 +101,9 @@ class Socket {
* set for some particular state of the socket.
* @return true if succeeded, false otherwise.
*/
virtual bool setOption(Socket& socket,
envoy::api::v2::core::SocketOption::SocketState state) const PURE;
virtual bool
setOption(Socket& socket,
envoy::config::core::v3alpha::SocketOption::SocketState state) const PURE;

/**
* @param vector of bytes to which the option should append hash key data that will be used
Expand Down Expand Up @@ -130,7 +131,7 @@ class Socket {
*/
virtual absl::optional<Details>
getOptionDetails(const Socket& socket,
envoy::api::v2::core::SocketOption::SocketState state) const PURE;
envoy::config::core::v3alpha::SocketOption::SocketState state) const PURE;
};

using OptionConstSharedPtr = std::shared_ptr<const Option>;
Expand All @@ -143,7 +144,7 @@ class Socket {
}

static bool applyOptions(const OptionsSharedPtr& options, Socket& socket,
envoy::api::v2::core::SocketOption::SocketState state) {
envoy::config::core::v3alpha::SocketOption::SocketState state) {
if (options == nullptr) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions include/envoy/network/listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <string>

#include "envoy/api/io_error.h"
#include "envoy/api/v2/core/base.pb.h"
#include "envoy/common/exception.h"
#include "envoy/config/core/v3alpha/base.pb.h"
#include "envoy/network/connection.h"
#include "envoy/network/connection_balancer.h"
#include "envoy/network/listen_socket.h"
Expand Down Expand Up @@ -135,7 +135,7 @@ class ListenerConfig {
/**
* @return traffic direction of the listener.
*/
virtual envoy::api::v2::core::TrafficDirection direction() const PURE;
virtual envoy::config::core::v3alpha::TrafficDirection direction() const PURE;

/**
* @return the connection balancer for this listener. All listeners have a connection balancer,
Expand Down
4 changes: 2 additions & 2 deletions include/envoy/network/resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <cstdint>
#include <string>

#include "envoy/api/v2/core/address.pb.h"
#include "envoy/common/pure.h"
#include "envoy/config/core/v3alpha/address.pb.h"
#include "envoy/network/address.h"

namespace Envoy {
Expand All @@ -26,7 +26,7 @@ class Resolver {
* @return InstanceConstSharedPtr appropriate Address::Instance.
*/
virtual InstanceConstSharedPtr
resolve(const envoy::api::v2::core::SocketAddress& socket_address) PURE;
resolve(const envoy::config::core::v3alpha::SocketAddress& socket_address) PURE;

/**
* @return std::string the identifying name for a particular implementation of
Expand Down
13 changes: 7 additions & 6 deletions include/envoy/router/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ envoy_cc_library(
hdrs = ["rds.h"],
deps = [
":router_interface",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/route/v3alpha:pkg_cc_proto",
],
)

Expand All @@ -30,8 +30,8 @@ envoy_cc_library(
"//include/envoy/stats:stats_interface",
"//include/envoy/thread_local:thread_local_interface",
"//include/envoy/upstream:cluster_manager_interface",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto",
"@envoy_api//envoy/config/route/v3alpha:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3alpha:pkg_cc_proto",
],
)

Expand All @@ -43,7 +43,8 @@ envoy_cc_library(
":rds_interface",
"//include/envoy/common:time_interface",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/route/v3alpha:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3alpha:pkg_cc_proto",
],
)

Expand All @@ -64,8 +65,8 @@ envoy_cc_library(
"//include/envoy/upstream:retry_interface",
"//source/common/protobuf",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/type:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3alpha:pkg_cc_proto",
"@envoy_api//envoy/type/v3alpha:pkg_cc_proto",
],
)

Expand Down
7 changes: 4 additions & 3 deletions include/envoy/router/rds.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <memory>

#include "envoy/api/v2/rds.pb.h"
#include "envoy/config/route/v3alpha/route.pb.h"
#include "envoy/router/router.h"

namespace Envoy {
Expand All @@ -16,7 +16,7 @@ class RouteConfigProvider {
struct ConfigInfo {
// A reference to the currently loaded route configuration. Do not hold this reference beyond
// the caller of configInfo()'s scope.
const envoy::api::v2::RouteConfiguration& config_;
const envoy::config::route::v3alpha::RouteConfiguration& config_;

// The discovery version that supplied this route. This will be set to "" in the case of
// static clusters.
Expand Down Expand Up @@ -52,7 +52,8 @@ class RouteConfigProvider {
/**
* Validate if the route configuration can be applied to the context of the route config provider.
*/
virtual void validateConfig(const envoy::api::v2::RouteConfiguration& config) const PURE;
virtual void
validateConfig(const envoy::config::route::v3alpha::RouteConfiguration& config) const PURE;
};

using RouteConfigProviderPtr = std::unique_ptr<RouteConfigProvider>;
Expand Down
12 changes: 6 additions & 6 deletions include/envoy/router/route_config_provider_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include <string>

#include "envoy/api/v2/rds.pb.h"
#include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.h"
#include "envoy/config/route/v3alpha/route.pb.h"
#include "envoy/event/dispatcher.h"
#include "envoy/extensions/filters/network/http_connection_manager/v3alpha/http_connection_manager.pb.h"
#include "envoy/json/json_object.h"
#include "envoy/local_info/local_info.h"
#include "envoy/router/rds.h"
Expand Down Expand Up @@ -38,7 +38,7 @@ class RouteConfigProviderManager {
* subscription.
*/
virtual RouteConfigProviderSharedPtr createRdsRouteConfigProvider(
const envoy::config::filter::network::http_connection_manager::v2::Rds& rds,
const envoy::extensions::filters::network::http_connection_manager::v3alpha::Rds& rds,
Server::Configuration::FactoryContext& factory_context, const std::string& stat_prefix,
Init::Manager& init_manager) PURE;

Expand All @@ -49,9 +49,9 @@ class RouteConfigProviderManager {
* @param runtime supplies the runtime loader.
* @param cm supplies the ClusterManager.
*/
virtual RouteConfigProviderPtr
createStaticRouteConfigProvider(const envoy::api::v2::RouteConfiguration& route_config,
Server::Configuration::FactoryContext& factory_context) PURE;
virtual RouteConfigProviderPtr createStaticRouteConfigProvider(
const envoy::config::route::v3alpha::RouteConfiguration& route_config,
Server::Configuration::FactoryContext& factory_context) PURE;
};

} // namespace Router
Expand Down
Loading

0 comments on commit cdc351f

Please sign in to comment.