Go to the documentation of this file.
15 #ifndef GRPCPP_SUPPORT_GLOBAL_CALLBACK_HOOK_H
16 #define GRPCPP_SUPPORT_GLOBAL_CALLBACK_HOOK_H
18 #include "absl/functional/function_ref.h"
28 absl::FunctionRef<
void()> callback) = 0;
32 template <
class Func,
class... Args>
34 #if GRPC_ALLOW_EXCEPTIONS
36 func(std::forward<Args>(args)...);
40 #else // GRPC_ALLOW_EXCEPTIONS
41 func(std::forward<Args>(args)...);
42 #endif // GRPC_ALLOW_EXCEPTIONS
49 absl::FunctionRef<
void()> callback)
override {
58 #endif // GRPCPP_SUPPORT_GLOBAL_CALLBACK_HOOK_H
Definition: global_callback_hook.h:46
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
void CatchingCallback(Func &&func, Args &&... args)
Definition: global_callback_hook.h:33
virtual ~GlobalCallbackHook()=default
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:68
virtual void RunCallback(grpc_call *call, absl::FunctionRef< void()> callback)=0
void SetGlobalCallbackHook(GlobalCallbackHook *hook)
void RunCallback(grpc_call *call, absl::FunctionRef< void()> callback) override
Definition: global_callback_hook.h:48
std::shared_ptr< GlobalCallbackHook > GetGlobalCallbackHook()
Definition: global_callback_hook.h:24