Go to the documentation of this file.
17 #ifndef GRPC_CORE_EXT_XDS_XDS_CLIENT_H
18 #define GRPC_CORE_EXT_XDS_XDS_CLIENT_H
29 #include "absl/base/thread_annotations.h"
30 #include "absl/status/status.h"
31 #include "absl/status/statusor.h"
32 #include "absl/strings/string_view.h"
125 ResourceWatcherInterface*
watcher,
126 bool delay_unsubscription =
false);
172 int c =
id.compare(other.
id);
173 if (c != 0)
return c < 0;
187 template <
typename T>
207 bool HasAdsCall()
const;
210 void StartConnectivityWatchLocked()
212 void CancelConnectivityWatchLocked();
219 bool delay_unsubscription)
245 std::map<ResourceWatcherInterface*, RefCountedPtr<ResourceWatcherInterface>>
248 std::unique_ptr<XdsResourceType::ResourceData>
resource;
250 bool ignored_deletion =
false;
255 std::map<const XdsResourceType*, std::map<XdsResourceKey, ResourceState>>
335 std::map<XdsBootstrap::XdsServer, ChannelState*> xds_server_channel_map_
341 std::map<XdsBootstrap::XdsServer, LoadReportServer>
346 std::map<ResourceWatcherInterface*, RefCountedPtr<ResourceWatcherInterface>>
362 #endif // GRPC_CORE_EXT_XDS_XDS_CLIENT_H
grpc_channel_args * args_
virtual void OnGenericResourceChanged(const XdsResourceType::ResourceData *resource) ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_)=0
XdsClusterLocalityStats::Snapshot deleted_locality_stats
RefCountedPtr< XdsClusterDropStats > AddClusterDropStats(const XdsBootstrap::XdsServer &xds_server, absl::string_view cluster_name, absl::string_view eds_service_name)
struct grpc_pollset_set grpc_pollset_set
XdsClient * xds_client() const
grpc_channel * channel() const
std::map< std::pair< std::string, std::string >, LoadReportState > LoadReportMap
const XdsResourceType * GetResourceTypeLocked(absl::string_view resource_type) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
XdsApi::ClusterLoadReportMap BuildLoadReportSnapshotLocked(const XdsBootstrap::XdsServer &xds_server, bool send_all_clusters, const std::set< std::string > &clusters) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
grpc_arg MakeChannelArg() const
std::map< const XdsResourceType *, std::map< XdsResourceKey, ResourceState > > resource_map
std::unique_ptr< XdsBootstrap > bootstrap_
bool operator<(const XdsResourceKey &other) const
static std::string ConstructFullXdsResourceName(absl::string_view authority, absl::string_view resource_type, const XdsResourceKey &key)
TraceFlag grpc_xds_client_trace(false, "xds_client")
std::vector< URI::QueryParam > query_params
OrphanablePtr< RetryableCall< AdsCallState > > ads_calld_
void RemoveClusterDropStats(const XdsBootstrap::XdsServer &xds_server, absl::string_view cluster_name, absl::string_view eds_service_name, XdsClusterDropStats *cluster_drop_stats)
void NotifyWatchersOnErrorLocked(const std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface >> &watchers, absl::Status status)
#define ABSL_EXCLUSIVE_LOCKS_REQUIRED(...)
TraceFlag grpc_xds_client_refcount_trace(false, "xds_client_refcount")
LrsCallState * lrs_calld() const
bool HasActiveAdsCall() const
static RefCountedPtr< XdsClient > GetOrCreate(const grpc_channel_args *args, grpc_error_handle *error)
std::unique_ptr< XdsResourceType::ResourceData > resource
void UnsetGlobalXdsClientForTest()
RefCountedPtr< ChannelState > GetOrCreateChannelStateLocked(const XdsBootstrap::XdsServer &server) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
void SetXdsFallbackBootstrapConfig(const char *config)
XdsApi::ResourceMetadata meta
LoadReportMap load_report_map
XdsClusterDropStats::Snapshot deleted_drop_stats
XdsClient(std::unique_ptr< XdsBootstrap > bootstrap, const grpc_channel_args *args)
void RemoveClusterLocalityStats(const XdsBootstrap::XdsServer &xds_server, absl::string_view cluster_name, absl::string_view eds_service_name, const RefCountedPtr< XdsLocalityName > &locality, XdsClusterLocalityStats *cluster_locality_stats)
const bool xds_federation_enabled_
void NotifyOnErrorLocked(absl::Status status) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
WeakRefCountedPtr< XdsClient > xds_client_
void CancelResourceWatch(const XdsResourceType *type, absl::string_view listener_name, ResourceWatcherInterface *watcher, bool delay_unsubscription=false)
OrphanablePtr< CertificateProviderStore > certificate_provider_store_
std::string eds_service_name
virtual void OnResourceDoesNotExist() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_)=0
grpc_pollset_set * interested_parties() const
virtual void OnError(absl::Status status) ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_)=0
std::map< RefCountedPtr< XdsLocalityName >, LocalityState, XdsLocalityName::Less > locality_stats
ChannelState(WeakRefCountedPtr< XdsClient > xds_client, const XdsBootstrap::XdsServer &server)
std::unique_ptr< T, Deleter > OrphanablePtr
absl::StatusOr< XdsResourceName > ParseXdsResourceName(absl::string_view name, const XdsResourceType *type)
void WatchResource(const XdsResourceType *type, absl::string_view name, RefCountedPtr< ResourceWatcherInterface > watcher)
static RefCountedPtr< XdsClient > GetFromChannelArgs(const grpc_channel_args &args)
grpc_pollset_set * interested_parties_
WorkSerializer work_serializer_
RefCountedPtr< XdsClusterLocalityStats > AddClusterLocalityStats(const XdsBootstrap::XdsServer &xds_server, absl::string_view cluster_name, absl::string_view eds_service_name, RefCountedPtr< XdsLocalityName > locality)
struct grpc_channel grpc_channel
std::map< const XdsResourceType *, std::string > resource_type_version_map_
const XdsBootstrap::XdsServer & server_
std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface > > watchers
CertificateProviderStore & certificate_provider_store()
RefCountedPtr< ChannelState > channel_state
AdsCallState * ads_calld() const
void MaybeRegisterResourceTypeLocked(const XdsResourceType *resource_type) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
std::string DumpClientConfigBinary()
OrphanablePtr< RetryableCall< LrsCallState > > lrs_calld_
void NotifyWatchersOnResourceDoesNotExist(const std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface >> &watchers)
const Duration request_timeout_
std::pair< std::string, std::string > pair
void SetXdsChannelArgsForTest(grpc_channel_args *args)
std::map< absl::string_view, const XdsResourceType * > resource_types_ ABSL_GUARDED_BY(mu_)
RefCountedPtr< ChannelState > channel_state
const XdsBootstrap & bootstrap() const
std::map< std::pair< std::string, std::string >, ClusterLoadReport > ClusterLoadReportMap
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:55