: context_(context), stats_(context.serverScope().store()), dns_resolver_fn_(dns_resolver_fn),
// Set when a cluster has been added or updated. This is only called a single time for a cluster.
// Return true if the cluster must be ready-for-use before ADS (Aggregated Discovery Service) can
#define ALL_THREAD_LOCAL_CLUSTER_MANAGER_STATS(GAUGE) GAUGE(clusters_inflated, NeverImport)
OptRef<const Cluster> getActiveOrWarmingCluster(const std::string& cluster_name) const override {
return active_clusters_.contains(cluster_name) || warming_clusters_.contains(cluster_name);
Grpc::AsyncClientManager& grpcAsyncClientManager() override { return *async_client_manager_; }
const ClusterTrafficStatNames& clusterStatNames() const override { return cluster_stat_names_; }
const ClusterLbStatNames& clusterLbStatNames() const override { return cluster_lb_stat_names_; }
const ClusterRequestResponseSizeStatNames& clusterRequestResponseSizeStatNames() const override {
std::shared_ptr<const envoy::config::cluster::v3::Cluster::CommonLbConfig> getCommonLbConfigPtr(
createNetworkObserverRegistries(Quic::EnvoyQuicNetworkObserverRegistryFactory& factory) override;
// clusterManagerFromProto() static method. The init() method must be called after construction.
virtual void postThreadLocalRemoveHosts(const Cluster& cluster, const HostVector& hosts_removed);
* An implementation of an on-demand CDS handle. It forwards the discovery request to the cluster
TcpConnPoolsContainer(HostHandlePtr&& host_handle) : host_handle_(std::move(host_handle)) {}
struct TcpConnContainer : public Network::ConnectionCallbacks, public Event::DeferredDeletable {
void setDropOverload(UnitFloat drop_overload) override { drop_overload_ = drop_overload; }
// When running as host process: This will usually be the computer's boot time, which means that
// `Cluster.CommonLbConfig.update_merge_window`, with the side effect to delay the first update.
* Holds a reference to an on-demand CDS to keep it alive for the duration of a cluster discovery,