Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/extensions/clusters/aggregate/cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Cluster::Cluster(const envoy::config::cluster::v3::Cluster& cluster,
Upstream::ClusterManager& cluster_manager, Runtime::Loader& runtime,
Random::RandomGenerator& random,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
Stats::ScopeSharedPtr&& stats_scope, bool added_via_api)
: Upstream::ClusterImplBase(cluster, runtime, factory_context, std::move(stats_scope),
added_via_api, factory_context.mainThreadDispatcher().timeSource()),
cluster_manager_(cluster_manager), runtime_(runtime), random_(random),
Expand Down Expand Up @@ -212,7 +212,7 @@ ClusterFactory::createClusterWithConfig(
const envoy::extensions::clusters::aggregate::v3::ClusterConfig& proto_config,
Upstream::ClusterFactoryContext& context,
Server::Configuration::TransportSocketFactoryContextImpl& socket_factory_context,
Stats::ScopePtr&& stats_scope) {
Stats::ScopeSharedPtr&& stats_scope) {
auto new_cluster =
std::make_shared<Cluster>(cluster, proto_config, context.clusterManager(), context.runtime(),
context.api().randomGenerator(), socket_factory_context,
Expand Down
4 changes: 2 additions & 2 deletions source/extensions/clusters/aggregate/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Cluster : public Upstream::ClusterImplBase {
Upstream::ClusterManager& cluster_manager, Runtime::Loader& runtime,
Random::RandomGenerator& random,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api);
Stats::ScopeSharedPtr&& stats_scope, bool added_via_api);

// Upstream::Cluster
Upstream::Cluster::InitializePhase initializePhase() const override {
Expand Down Expand Up @@ -174,7 +174,7 @@ class ClusterFactory : public Upstream::ConfigurableClusterFactoryBase<
const envoy::extensions::clusters::aggregate::v3::ClusterConfig& proto_config,
Upstream::ClusterFactoryContext& context,
Server::Configuration::TransportSocketFactoryContextImpl& socket_factory_context,
Stats::ScopePtr&& stats_scope) override;
Stats::ScopeSharedPtr&& stats_scope) override;
};

DECLARE_FACTORY(ClusterFactory);
Expand Down
4 changes: 2 additions & 2 deletions source/extensions/clusters/dynamic_forward_proxy/cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Cluster::Cluster(
Extensions::Common::DynamicForwardProxy::DnsCacheManagerFactory& cache_manager_factory,
const LocalInfo::LocalInfo& local_info,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api)
Stats::ScopeSharedPtr&& stats_scope, bool added_via_api)
: Upstream::BaseDynamicClusterImpl(cluster, runtime, factory_context, std::move(stats_scope),
added_via_api,
factory_context.mainThreadDispatcher().timeSource()),
Expand Down Expand Up @@ -248,7 +248,7 @@ ClusterFactory::createClusterWithConfig(
const envoy::extensions::clusters::dynamic_forward_proxy::v3::ClusterConfig& proto_config,
Upstream::ClusterFactoryContext& context,
Server::Configuration::TransportSocketFactoryContextImpl& socket_factory_context,
Stats::ScopePtr&& stats_scope) {
Stats::ScopeSharedPtr&& stats_scope) {
Extensions::Common::DynamicForwardProxy::DnsCacheManagerFactoryImpl cache_manager_factory(
context);
envoy::config::cluster::v3::Cluster cluster_config = cluster;
Expand Down
4 changes: 2 additions & 2 deletions source/extensions/clusters/dynamic_forward_proxy/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Cluster : public Upstream::BaseDynamicClusterImpl,
Extensions::Common::DynamicForwardProxy::DnsCacheManagerFactory& cache_manager_factory,
const LocalInfo::LocalInfo& local_info,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api);
Stats::ScopeSharedPtr&& stats_scope, bool added_via_api);

// Upstream::Cluster
Upstream::Cluster::InitializePhase initializePhase() const override {
Expand Down Expand Up @@ -167,7 +167,7 @@ class ClusterFactory : public Upstream::ConfigurableClusterFactoryBase<
const envoy::extensions::clusters::dynamic_forward_proxy::v3::ClusterConfig& proto_config,
Upstream::ClusterFactoryContext& context,
Server::Configuration::TransportSocketFactoryContextImpl& socket_factory_context,
Stats::ScopePtr&& stats_scope) override;
Stats::ScopeSharedPtr&& stats_scope) override;
};

DECLARE_FACTORY(ClusterFactory);
Expand Down
4 changes: 2 additions & 2 deletions source/extensions/clusters/redis/redis_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RedisCluster::RedisCluster(
Upstream::ClusterManager& cluster_manager, Runtime::Loader& runtime, Api::Api& api,
Network::DnsResolverSharedPtr dns_resolver,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api,
Stats::ScopeSharedPtr&& stats_scope, bool added_via_api,
ClusterSlotUpdateCallBackSharedPtr lb_factory)
: Upstream::BaseDynamicClusterImpl(cluster, runtime, factory_context, std::move(stats_scope),
added_via_api,
Expand Down Expand Up @@ -401,7 +401,7 @@ RedisClusterFactory::createClusterWithConfig(
const envoy::extensions::clusters::redis::v3::RedisClusterConfig& proto_config,
Upstream::ClusterFactoryContext& context,
Envoy::Server::Configuration::TransportSocketFactoryContextImpl& socket_factory_context,
Envoy::Stats::ScopePtr&& stats_scope) {
Envoy::Stats::ScopeSharedPtr&& stats_scope) {
if (!cluster.has_cluster_type() || cluster.cluster_type().name() != "envoy.clusters.redis") {
throw EnvoyException("Redis cluster can only created with redis cluster type.");
}
Expand Down
4 changes: 2 additions & 2 deletions source/extensions/clusters/redis/redis_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class RedisCluster : public Upstream::BaseDynamicClusterImpl {
Upstream::ClusterManager& cluster_manager, Runtime::Loader& runtime, Api::Api& api,
Network::DnsResolverSharedPtr dns_resolver,
Server::Configuration::TransportSocketFactoryContextImpl& factory_context,
Stats::ScopePtr&& stats_scope, bool added_via_api,
Stats::ScopeSharedPtr&& stats_scope, bool added_via_api,
ClusterSlotUpdateCallBackSharedPtr factory);

struct ClusterSlotsRequest : public Extensions::NetworkFilters::Common::Redis::RespValue {
Expand Down Expand Up @@ -298,7 +298,7 @@ class RedisClusterFactory : public Upstream::ConfigurableClusterFactoryBase<
const envoy::extensions::clusters::redis::v3::RedisClusterConfig& proto_config,
Upstream::ClusterFactoryContext& context,
Server::Configuration::TransportSocketFactoryContextImpl& socket_factory_context,
Stats::ScopePtr&& stats_scope) override;
Stats::ScopeSharedPtr&& stats_scope) override;
};
} // namespace Redis
} // namespace Clusters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class DnsCacheImpl : public DnsCache, Logger::Loggable<Logger::Id::forward_proxy
const Network::DnsLookupFamily dns_lookup_family_;
const Network::DnsResolverSharedPtr resolver_;
ThreadLocal::TypedSlot<ThreadLocalHostInfo> tls_slot_;
Stats::ScopePtr scope_;
Stats::ScopeSharedPtr scope_;
DnsCacheStats stats_;
std::list<AddUpdateCallbacksHandleImpl*> update_callbacks_;
absl::Mutex primary_hosts_lock_;
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/filters/network/redis_proxy/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Network::FilterFactoryCb RedisProxyFilterConfigFactory::createFilterFactoryFromP

Upstreams upstreams;
for (auto& cluster : unique_clusters) {
Stats::ScopePtr stats_scope =
Stats::ScopeSharedPtr stats_scope =
context.scope().createScope(fmt::format("cluster.{}.redis_cluster", cluster));
auto conn_pool_ptr = std::make_shared<ConnPool::InstanceImpl>(
cluster, context.clusterManager(), Common::Redis::Client::ClientFactoryImpl::instance_,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ InstanceImpl::InstanceImpl(
Common::Redis::Client::ClientFactory& client_factory, ThreadLocal::SlotAllocator& tls,
const envoy::extensions::filters::network::redis_proxy::v3::RedisProxy::ConnPoolSettings&
config,
Api::Api& api, Stats::ScopePtr&& stats_scope,
Api::Api& api, Stats::ScopeSharedPtr&& stats_scope,
const Common::Redis::RedisCommandStatsSharedPtr& redis_command_stats,
Extensions::Common::Redis::ClusterRefreshManagerSharedPtr refresh_manager)
: cluster_name_(cluster_name), cm_(cm), client_factory_(client_factory),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class InstanceImpl : public Instance, public std::enable_shared_from_this<Instan
Common::Redis::Client::ClientFactory& client_factory, ThreadLocal::SlotAllocator& tls,
const envoy::extensions::filters::network::redis_proxy::v3::RedisProxy::ConnPoolSettings&
config,
Api::Api& api, Stats::ScopePtr&& stats_scope,
Api::Api& api, Stats::ScopeSharedPtr&& stats_scope,
const Common::Redis::RedisCommandStatsSharedPtr& redis_command_stats,
Extensions::Common::Redis::ClusterRefreshManagerSharedPtr refresh_manager);
// RedisProxy::ConnPool::Instance
Expand Down
2 changes: 1 addition & 1 deletion test/extensions/clusters/aggregate/cluster_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class AggregateClusterTest : public Event::TestUsingSimulatedTime, public testin
envoy::extensions::clusters::aggregate::v3::ClusterConfig config;
Config::Utility::translateOpaqueConfig(cluster_config.cluster_type().typed_config(),
ProtobufMessage::getStrictValidationVisitor(), config);
Stats::ScopePtr scope = stats_store_.createScope("cluster.name.");
Stats::ScopeSharedPtr scope = stats_store_.createScope("cluster.name.");
Server::Configuration::TransportSocketFactoryContextImpl factory_context(
admin_, ssl_context_manager_, *scope, cm_, local_info_, dispatcher_, stats_store_,
singleton_manager_, tls_, validation_visitor_, *api_, options_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ClusterTest : public testing::Test,
envoy::extensions::clusters::dynamic_forward_proxy::v3::ClusterConfig config;
Config::Utility::translateOpaqueConfig(cluster_config.cluster_type().typed_config(),
ProtobufMessage::getStrictValidationVisitor(), config);
Stats::ScopePtr scope = stats_store_.createScope("cluster.name.");
Stats::ScopeSharedPtr scope = stats_store_.createScope("cluster.name.");
Server::Configuration::TransportSocketFactoryContextImpl factory_context(
admin_, ssl_context_manager_, *scope, cm_, local_info_, dispatcher_, stats_store_,
singleton_manager_, tls_, validation_visitor_, *api_, options_);
Expand Down
4 changes: 2 additions & 2 deletions test/extensions/clusters/redis/redis_cluster_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class RedisClusterTest : public testing::Test,
expectRedisSessionCreated();
NiceMock<Upstream::MockClusterManager> cm;
envoy::config::cluster::v3::Cluster cluster_config = Upstream::parseClusterFromV3Yaml(yaml);
Envoy::Stats::ScopePtr scope = stats_store_.createScope(fmt::format(
Envoy::Stats::ScopeSharedPtr scope = stats_store_.createScope(fmt::format(
"cluster.{}.", cluster_config.alt_stat_name().empty() ? cluster_config.name()
: cluster_config.alt_stat_name()));
Envoy::Server::Configuration::TransportSocketFactoryContextImpl factory_context(
Expand Down Expand Up @@ -128,7 +128,7 @@ class RedisClusterTest : public testing::Test,
void setupFactoryFromV3Yaml(const std::string& yaml) {
NiceMock<Upstream::MockClusterManager> cm;
envoy::config::cluster::v3::Cluster cluster_config = Upstream::parseClusterFromV3Yaml(yaml);
Envoy::Stats::ScopePtr scope = stats_store_.createScope(fmt::format(
Envoy::Stats::ScopeSharedPtr scope = stats_store_.createScope(fmt::format(
"cluster.{}.", cluster_config.alt_stat_name().empty() ? cluster_config.name()
: cluster_config.alt_stat_name()));
Envoy::Server::Configuration::TransportSocketFactoryContextImpl factory_context(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class RedisClientImplTest : public testing::Test,
std::unique_ptr<Config> config_;
ClientPtr client_;
NiceMock<Stats::MockIsolatedStatsStore> stats_;
Stats::ScopePtr stats_scope_;
Stats::ScopeSharedPtr stats_scope_;
Common::Redis::RedisCommandStatsSharedPtr redis_command_stats_;
std::string auth_username_;
std::string auth_password_;
Expand Down