Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc_core::FileWatcherAuthorizationPolicyProvider Class Reference

#include <grpc_authorization_policy_provider.h>

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

Public Member Functions

AuthorizationEngines engines () override
 
 FileWatcherAuthorizationPolicyProvider (absl::string_view authz_policy_path, unsigned int refresh_interval_sec, absl::Status *status)
 
void Orphan () override
 
void SetCallbackForTesting (std::function< void(bool contents_changed, absl::Status Status)> cb)
 
- Public Member Functions inherited from grpc_core::DualRefCounted< grpc_authorization_policy_provider >
 DualRefCounted (const DualRefCounted &)=delete
 
DualRefCountedoperator= (const DualRefCounted &)=delete
 
RefCountedPtr< grpc_authorization_policy_providerRef () GRPC_MUST_USE_RESULT
 
RefCountedPtr< grpc_authorization_policy_providerRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
RefCountedPtr< grpc_authorization_policy_providerRefIfNonZero () GRPC_MUST_USE_RESULT
 
RefCountedPtr< grpc_authorization_policy_providerRefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
WeakRefCountedPtr< grpc_authorization_policy_providerWeakRef () GRPC_MUST_USE_RESULT
 
WeakRefCountedPtr< grpc_authorization_policy_providerWeakRef (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 absl::StatusOr< RefCountedPtr< grpc_authorization_policy_provider > > Create (absl::string_view authz_policy_path, unsigned int refresh_interval_sec)
 
- Static Public Member Functions inherited from grpc_authorization_policy_provider
static absl::string_view ChannelArgName ()
 
static int ChannelArgsCompare (const grpc_authorization_policy_provider *a, const grpc_authorization_policy_provider *b)
 

Private Member Functions

std::function< void(bool contents_changed, absl::Status status)> cb_ ABSL_GUARDED_BY (mu_)
 
RefCountedPtr< AuthorizationEngine > allow_engine_ ABSL_GUARDED_BY (mu_)
 
RefCountedPtr< AuthorizationEngine > deny_engine_ ABSL_GUARDED_BY (mu_)
 
absl::Status ForceUpdate ()
 

Private Attributes

std::string authz_policy_path_
 
std::string file_contents_
 
Mutex mu_
 
unsigned int refresh_interval_sec_
 
std::unique_ptr< Threadrefresh_thread_
 
gpr_event shutdown_event_
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::DualRefCounted< grpc_authorization_policy_provider >
 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 74 of file grpc_authorization_policy_provider.h.

Constructor & Destructor Documentation

◆ FileWatcherAuthorizationPolicyProvider()

grpc_core::FileWatcherAuthorizationPolicyProvider::FileWatcherAuthorizationPolicyProvider ( absl::string_view  authz_policy_path,
unsigned int  refresh_interval_sec,
absl::Status status 
)

Definition at line 97 of file grpc_authorization_policy_provider.cc.

Member Function Documentation

◆ ABSL_GUARDED_BY() [1/3]

std::function<void(bool contents_changed, absl::Status status)> cb_ grpc_core::FileWatcherAuthorizationPolicyProvider::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [2/3]

RefCountedPtr<AuthorizationEngine> allow_engine_ grpc_core::FileWatcherAuthorizationPolicyProvider::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [3/3]

RefCountedPtr<AuthorizationEngine> deny_engine_ grpc_core::FileWatcherAuthorizationPolicyProvider::ABSL_GUARDED_BY ( mu_  )
private

◆ Create()

absl::StatusOr< RefCountedPtr< grpc_authorization_policy_provider > > grpc_core::FileWatcherAuthorizationPolicyProvider::Create ( absl::string_view  authz_policy_path,
unsigned int  refresh_interval_sec 
)
static

Definition at line 86 of file grpc_authorization_policy_provider.cc.

◆ engines()

AuthorizationEngines grpc_core::FileWatcherAuthorizationPolicyProvider::engines ( )
inlineoverridevirtual

◆ ForceUpdate()

absl::Status grpc_core::FileWatcherAuthorizationPolicyProvider::ForceUpdate ( )
private

Definition at line 139 of file grpc_authorization_policy_provider.cc.

◆ Orphan()

void grpc_core::FileWatcherAuthorizationPolicyProvider::Orphan ( )
overridevirtual

Implements grpc_core::Orphanable.

Definition at line 179 of file grpc_authorization_policy_provider.cc.

◆ SetCallbackForTesting()

void grpc_core::FileWatcherAuthorizationPolicyProvider::SetCallbackForTesting ( std::function< void(bool contents_changed, absl::Status Status)>  cb)

Definition at line 133 of file grpc_authorization_policy_provider.cc.

Member Data Documentation

◆ authz_policy_path_

std::string grpc_core::FileWatcherAuthorizationPolicyProvider::authz_policy_path_
private

Definition at line 101 of file grpc_authorization_policy_provider.h.

◆ file_contents_

std::string grpc_core::FileWatcherAuthorizationPolicyProvider::file_contents_
private

Definition at line 102 of file grpc_authorization_policy_provider.h.

◆ mu_

Mutex grpc_core::FileWatcherAuthorizationPolicyProvider::mu_
private

Definition at line 108 of file grpc_authorization_policy_provider.h.

◆ refresh_interval_sec_

unsigned int grpc_core::FileWatcherAuthorizationPolicyProvider::refresh_interval_sec_
private

Definition at line 103 of file grpc_authorization_policy_provider.h.

◆ refresh_thread_

std::unique_ptr<Thread> grpc_core::FileWatcherAuthorizationPolicyProvider::refresh_thread_
private

Definition at line 105 of file grpc_authorization_policy_provider.h.

◆ shutdown_event_

gpr_event grpc_core::FileWatcherAuthorizationPolicyProvider::shutdown_event_
private

Definition at line 106 of file grpc_authorization_policy_provider.h.


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


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