Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
grpc_core::XdsClient Class Reference

#include <xds_client.h>

Inheritance diagram for grpc_core::XdsClient:
Inheritance graph
[legend]

Classes

struct  AuthorityState
 
class  ChannelState
 
struct  LoadReportServer
 
struct  LoadReportState
 
struct  ResourceState
 
class  ResourceWatcherInterface
 
struct  XdsResourceKey
 
struct  XdsResourceName
 

Public Member Functions

RefCountedPtr< XdsClusterDropStatsAddClusterDropStats (const XdsBootstrap::XdsServer &xds_server, absl::string_view cluster_name, absl::string_view eds_service_name)
 
RefCountedPtr< XdsClusterLocalityStatsAddClusterLocalityStats (const XdsBootstrap::XdsServer &xds_server, absl::string_view cluster_name, absl::string_view eds_service_name, RefCountedPtr< XdsLocalityName > locality)
 
const XdsBootstrapbootstrap () const
 
void CancelResourceWatch (const XdsResourceType *type, absl::string_view listener_name, ResourceWatcherInterface *watcher, bool delay_unsubscription=false)
 
CertificateProviderStorecertificate_provider_store ()
 
std::string DumpClientConfigBinary ()
 
grpc_pollset_setinterested_parties () const
 
grpc_arg MakeChannelArg () const
 
void Orphan () override
 
void RemoveClusterDropStats (const XdsBootstrap::XdsServer &xds_server, absl::string_view cluster_name, absl::string_view eds_service_name, XdsClusterDropStats *cluster_drop_stats)
 
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)
 
void ResetBackoff ()
 
void WatchResource (const XdsResourceType *type, absl::string_view name, RefCountedPtr< ResourceWatcherInterface > watcher)
 
 XdsClient (std::unique_ptr< XdsBootstrap > bootstrap, const grpc_channel_args *args)
 
 ~XdsClient () override
 
- Public Member Functions inherited from grpc_core::DualRefCounted< XdsClient >
 DualRefCounted (const DualRefCounted &)=delete
 
DualRefCountedoperator= (const DualRefCounted &)=delete
 
RefCountedPtr< XdsClientRef () GRPC_MUST_USE_RESULT
 
RefCountedPtr< XdsClientRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
RefCountedPtr< XdsClientRefIfNonZero () GRPC_MUST_USE_RESULT
 
RefCountedPtr< XdsClientRefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
WeakRefCountedPtr< XdsClientWeakRef () GRPC_MUST_USE_RESULT
 
WeakRefCountedPtr< XdsClientWeakRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void WeakUnref ()
 
void WeakUnref (const DebugLocation &location, const char *reason)
 
 ~DualRefCounted () override=default
 
- Public Member Functions inherited from grpc_core::Orphanable
Orphanableoperator= (const Orphanable &)=delete
 
 Orphanable (const Orphanable &)=delete
 

Static Public Member Functions

static RefCountedPtr< XdsClientGetFromChannelArgs (const grpc_channel_args &args)
 
static RefCountedPtr< XdsClientGetOrCreate (const grpc_channel_args *args, grpc_error_handle *error)
 

Private Types

using LoadReportMap = std::map< std::pair< std::string, std::string >, LoadReportState >
 

Private Member Functions

std::map< absl::string_view, const XdsResourceType * > resource_types_ ABSL_GUARDED_BY (mu_)
 
std::map< absl::string_view, const XdsResourceType * > v2_resource_types_ ABSL_GUARDED_BY (mu_)
 
upb::SymbolTable symtab_ ABSL_GUARDED_BY (mu_)
 
std::map< XdsBootstrap::XdsServer, ChannelState * > xds_server_channel_map_ ABSL_GUARDED_BY (mu_)
 
std::map< std::string, AuthorityState > authority_state_map_ ABSL_GUARDED_BY (mu_)
 
std::map< XdsBootstrap::XdsServer, LoadReportServer > xds_load_report_server_map_ ABSL_GUARDED_BY (mu_)
 
std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface > > invalid_watchers_ ABSL_GUARDED_BY (mu_)
 
bool shutting_down_ ABSL_GUARDED_BY (mu_)
 
XdsApi::ClusterLoadReportMap BuildLoadReportSnapshotLocked (const XdsBootstrap::XdsServer &xds_server, bool send_all_clusters, const std::set< std::string > &clusters) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
RefCountedPtr< ChannelStateGetOrCreateChannelStateLocked (const XdsBootstrap::XdsServer &server) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
const XdsResourceTypeGetResourceTypeLocked (absl::string_view resource_type) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void MaybeRegisterResourceTypeLocked (const XdsResourceType *resource_type) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void NotifyOnErrorLocked (absl::Status status) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void NotifyWatchersOnErrorLocked (const std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface >> &watchers, absl::Status status)
 
void NotifyWatchersOnResourceDoesNotExist (const std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface >> &watchers)
 
absl::StatusOr< XdsResourceNameParseXdsResourceName (absl::string_view name, const XdsResourceType *type)
 

Static Private Member Functions

static std::string ConstructFullXdsResourceName (absl::string_view authority, absl::string_view resource_type, const XdsResourceKey &key)
 

Private Attributes

XdsApi api_
 
grpc_channel_argsargs_
 
std::unique_ptr< XdsBootstrapbootstrap_
 
OrphanablePtr< CertificateProviderStorecertificate_provider_store_
 
grpc_pollset_setinterested_parties_
 
Mutex mu_
 
const Duration request_timeout_
 
WorkSerializer work_serializer_
 
const bool xds_federation_enabled_
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::DualRefCounted< XdsClient >
 DualRefCounted (const char *trace=nullptr, int32_t initial_refcount=1)
 
- Protected Member Functions inherited from grpc_core::Orphanable
 Orphanable ()
 
virtual ~Orphanable ()
 

Detailed Description

Definition at line 60 of file xds_client.h.

Member Typedef Documentation

◆ LoadReportMap

using grpc_core::XdsClient::LoadReportMap = std::map< std::pair<std::string , std::string >, LoadReportState>
private

Definition at line 276 of file xds_client.h.

Constructor & Destructor Documentation

◆ XdsClient()

grpc_core::XdsClient::XdsClient ( std::unique_ptr< XdsBootstrap bootstrap,
const grpc_channel_args args 
)

Definition at line 1851 of file xds_client.cc.

◆ ~XdsClient()

grpc_core::XdsClient::~XdsClient ( )
override

Definition at line 1873 of file xds_client.cc.

Member Function Documentation

◆ ABSL_GUARDED_BY() [1/8]

std::map<absl::string_view , const XdsResourceType*> resource_types_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [2/8]

std::map<absl::string_view , const XdsResourceType*> v2_resource_types_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [3/8]

upb::SymbolTable symtab_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [4/8]

std::map<XdsBootstrap::XdsServer, ChannelState*> xds_server_channel_map_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [5/8]

std::map<std::string , AuthorityState> authority_state_map_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [6/8]

std::map<XdsBootstrap::XdsServer, LoadReportServer> xds_load_report_server_map_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [7/8]

std::map<ResourceWatcherInterface*, RefCountedPtr<ResourceWatcherInterface> > invalid_watchers_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [8/8]

bool shutting_down_ grpc_core::XdsClient::ABSL_GUARDED_BY ( mu_  )
private

◆ AddClusterDropStats()

RefCountedPtr< XdsClusterDropStats > grpc_core::XdsClient::AddClusterDropStats ( const XdsBootstrap::XdsServer xds_server,
absl::string_view  cluster_name,
absl::string_view  eds_service_name 
)

Definition at line 2098 of file xds_client.cc.

◆ AddClusterLocalityStats()

RefCountedPtr< XdsClusterLocalityStats > grpc_core::XdsClient::AddClusterLocalityStats ( const XdsBootstrap::XdsServer xds_server,
absl::string_view  cluster_name,
absl::string_view  eds_service_name,
RefCountedPtr< XdsLocalityName locality 
)

Definition at line 2158 of file xds_client.cc.

◆ bootstrap()

const XdsBootstrap& grpc_core::XdsClient::bootstrap ( ) const
inline

Definition at line 88 of file xds_client.h.

◆ BuildLoadReportSnapshotLocked()

XdsApi::ClusterLoadReportMap grpc_core::XdsClient::BuildLoadReportSnapshotLocked ( const XdsBootstrap::XdsServer xds_server,
bool  send_all_clusters,
const std::set< std::string > &  clusters 
)
private

Definition at line 2291 of file xds_client.cc.

◆ CancelResourceWatch()

void grpc_core::XdsClient::CancelResourceWatch ( const XdsResourceType type,
absl::string_view  listener_name,
ResourceWatcherInterface watcher,
bool  delay_unsubscription = false 
)

Definition at line 1990 of file xds_client.cc.

◆ certificate_provider_store()

CertificateProviderStore& grpc_core::XdsClient::certificate_provider_store ( )
inline

Definition at line 94 of file xds_client.h.

◆ ConstructFullXdsResourceName()

std::string grpc_core::XdsClient::ConstructFullXdsResourceName ( absl::string_view  authority,
absl::string_view  resource_type,
const XdsResourceKey key 
)
staticprivate

Definition at line 2084 of file xds_client.cc.

◆ DumpClientConfigBinary()

std::string grpc_core::XdsClient::DumpClientConfigBinary ( )

Definition at line 2376 of file xds_client.cc.

◆ GetFromChannelArgs()

RefCountedPtr< XdsClient > grpc_core::XdsClient::GetFromChannelArgs ( const grpc_channel_args args)
static

Definition at line 2563 of file xds_client.cc.

◆ GetOrCreate()

RefCountedPtr< XdsClient > grpc_core::XdsClient::GetOrCreate ( const grpc_channel_args args,
grpc_error_handle error 
)
static

Definition at line 2465 of file xds_client.cc.

◆ GetOrCreateChannelStateLocked()

RefCountedPtr< XdsClient::ChannelState > grpc_core::XdsClient::GetOrCreateChannelStateLocked ( const XdsBootstrap::XdsServer server)
private

Definition at line 1901 of file xds_client.cc.

◆ GetResourceTypeLocked()

const XdsResourceType * grpc_core::XdsClient::GetResourceTypeLocked ( absl::string_view  resource_type)
private

Definition at line 2047 of file xds_client.cc.

◆ interested_parties()

grpc_pollset_set* grpc_core::XdsClient::interested_parties ( ) const
inline

Definition at line 98 of file xds_client.h.

◆ MakeChannelArg()

grpc_arg grpc_core::XdsClient::MakeChannelArg ( ) const

Definition at line 2557 of file xds_client.cc.

◆ MaybeRegisterResourceTypeLocked()

void grpc_core::XdsClient::MaybeRegisterResourceTypeLocked ( const XdsResourceType resource_type)
private

Definition at line 2035 of file xds_client.cc.

◆ NotifyOnErrorLocked()

void grpc_core::XdsClient::NotifyOnErrorLocked ( absl::Status  status)
private

Definition at line 2232 of file xds_client.cc.

◆ NotifyWatchersOnErrorLocked()

void grpc_core::XdsClient::NotifyWatchersOnErrorLocked ( const std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface >> &  watchers,
absl::Status  status 
)
private

Definition at line 2260 of file xds_client.cc.

◆ NotifyWatchersOnResourceDoesNotExist()

void grpc_core::XdsClient::NotifyWatchersOnResourceDoesNotExist ( const std::map< ResourceWatcherInterface *, RefCountedPtr< ResourceWatcherInterface >> &  watchers)
private

Definition at line 2279 of file xds_client.cc.

◆ Orphan()

void grpc_core::XdsClient::Orphan ( )
overridevirtual

Implements grpc_core::Orphanable.

Definition at line 1884 of file xds_client.cc.

◆ ParseXdsResourceName()

absl::StatusOr< XdsClient::XdsResourceName > grpc_core::XdsClient::ParseXdsResourceName ( absl::string_view  name,
const XdsResourceType type 
)
private

Definition at line 2056 of file xds_client.cc.

◆ RemoveClusterDropStats()

void grpc_core::XdsClient::RemoveClusterDropStats ( const XdsBootstrap::XdsServer xds_server,
absl::string_view  cluster_name,
absl::string_view  eds_service_name,
XdsClusterDropStats cluster_drop_stats 
)

Definition at line 2138 of file xds_client.cc.

◆ RemoveClusterLocalityStats()

void grpc_core::XdsClient::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 
)

Definition at line 2201 of file xds_client.cc.

◆ ResetBackoff()

void grpc_core::XdsClient::ResetBackoff ( )

Definition at line 2225 of file xds_client.cc.

◆ WatchResource()

void grpc_core::XdsClient::WatchResource ( const XdsResourceType type,
absl::string_view  name,
RefCountedPtr< ResourceWatcherInterface watcher 
)

Definition at line 1914 of file xds_client.cc.

Member Data Documentation

◆ api_

XdsApi grpc_core::XdsClient::api_
private

Definition at line 322 of file xds_client.h.

◆ args_

grpc_channel_args* grpc_core::XdsClient::args_
private

Definition at line 317 of file xds_client.h.

◆ bootstrap_

std::unique_ptr<XdsBootstrap> grpc_core::XdsClient::bootstrap_
private

Definition at line 316 of file xds_client.h.

◆ certificate_provider_store_

OrphanablePtr<CertificateProviderStore> grpc_core::XdsClient::certificate_provider_store_
private

Definition at line 321 of file xds_client.h.

◆ interested_parties_

grpc_pollset_set* grpc_core::XdsClient::interested_parties_
private

Definition at line 320 of file xds_client.h.

◆ mu_

Mutex grpc_core::XdsClient::mu_
private

Definition at line 325 of file xds_client.h.

◆ request_timeout_

const Duration grpc_core::XdsClient::request_timeout_
private

Definition at line 318 of file xds_client.h.

◆ work_serializer_

WorkSerializer grpc_core::XdsClient::work_serializer_
private

Definition at line 323 of file xds_client.h.

◆ xds_federation_enabled_

const bool grpc_core::XdsClient::xds_federation_enabled_
private

Definition at line 319 of file xds_client.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:37