GRPC C++
1.71.0
|
Namespaces | |
detail | |
internal | |
slice_detail | |
Data Structures | |
class | EndpointConfig |
Collection of parameters used to configure client and server endpoints. More... | |
class | EventEngine |
The EventEngine Interface. More... | |
class | Extensible |
class | MemoryAllocator |
class | MemoryAllocatorFactory |
class | MemoryRequest |
Reservation request - how much memory do we want to allocate? More... | |
class | MutableSlice |
class | Slice |
class | SliceBuffer |
A Wrapper around grpc_slice_buffer pointer. More... | |
class | Vector |
Functions | |
void | SetEventEngineFactory (absl::AnyInvocable< std::shared_ptr< EventEngine >()> factory) |
[DEPRECATED] Replace gRPC's default EventEngine factory. More... | |
void | EventEngineFactoryReset () |
[DEPRECATED] Reset gRPC's EventEngine factory to the built-in default. More... | |
std::shared_ptr< EventEngine > | CreateEventEngine () |
Create a new EventEngine instance. More... | |
void | SetDefaultEventEngine (std::shared_ptr< EventEngine > engine) |
Set the default EventEngine instance, which will be used throughout gRPC. More... | |
std::shared_ptr< EventEngine > | GetDefaultEventEngine () |
Returns the default EventEngine instance. More... | |
void | ShutdownDefaultEventEngine () |
Resets gRPC to use one of the default internal EventEngines for all new GetDefaultEventEngine requests and blocks until all refs on the active default engine have been released (destroying that engine). More... | |
bool | operator== (const EventEngine::TaskHandle &lhs, const EventEngine::TaskHandle &rhs) |
bool | operator!= (const EventEngine::TaskHandle &lhs, const EventEngine::TaskHandle &rhs) |
std::ostream & | operator<< (std::ostream &out, const EventEngine::TaskHandle &handle) |
bool | operator== (const EventEngine::ConnectionHandle &lhs, const EventEngine::ConnectionHandle &rhs) |
bool | operator!= (const EventEngine::ConnectionHandle &lhs, const EventEngine::ConnectionHandle &rhs) |
std::ostream & | operator<< (std::ostream &out, const EventEngine::ConnectionHandle &handle) |
template<typename Sink > | |
void | AbslStringify (Sink &out, const EventEngine::ConnectionHandle &handle) |
template<typename Sink > | |
void | AbslStringify (Sink &out, const EventEngine::TaskHandle &handle) |
void grpc_event_engine::experimental::AbslStringify | ( | Sink & | out, |
const EventEngine::ConnectionHandle & | handle | ||
) |
void grpc_event_engine::experimental::AbslStringify | ( | Sink & | out, |
const EventEngine::TaskHandle & | handle | ||
) |
std::shared_ptr<EventEngine> grpc_event_engine::experimental::CreateEventEngine | ( | ) |
Create a new EventEngine instance.
void grpc_event_engine::experimental::EventEngineFactoryReset | ( | ) |
[DEPRECATED] Reset gRPC's EventEngine factory to the built-in default.
Applications that have called SetEventEngineFactory can remove their custom factory using this method. The built-in EventEngine factories will be used going forward. This has no affect on any EventEngines that were created using the previous factories.
std::shared_ptr<EventEngine> grpc_event_engine::experimental::GetDefaultEventEngine | ( | ) |
Returns the default EventEngine instance.
Note that if SetDefaultEventEngine() has not been called, then the default EventEngine may be created and destroyed as needed, meaning that multiple calls to GetDefaultEventEngine() over a process's lifetime may return different instances. Callers are expected to call GetDefaultEventEngine() once and hold the returned reference for as long as they need the EventEngine instance.
bool grpc_event_engine::experimental::operator!= | ( | const EventEngine::ConnectionHandle & | lhs, |
const EventEngine::ConnectionHandle & | rhs | ||
) |
bool grpc_event_engine::experimental::operator!= | ( | const EventEngine::TaskHandle & | lhs, |
const EventEngine::TaskHandle & | rhs | ||
) |
std::ostream& grpc_event_engine::experimental::operator<< | ( | std::ostream & | out, |
const EventEngine::ConnectionHandle & | handle | ||
) |
std::ostream& grpc_event_engine::experimental::operator<< | ( | std::ostream & | out, |
const EventEngine::TaskHandle & | handle | ||
) |
bool grpc_event_engine::experimental::operator== | ( | const EventEngine::ConnectionHandle & | lhs, |
const EventEngine::ConnectionHandle & | rhs | ||
) |
bool grpc_event_engine::experimental::operator== | ( | const EventEngine::TaskHandle & | lhs, |
const EventEngine::TaskHandle & | rhs | ||
) |
void grpc_event_engine::experimental::SetDefaultEventEngine | ( | std::shared_ptr< EventEngine > | engine | ) |
Set the default EventEngine instance, which will be used throughout gRPC.
gRPC will hold a ref to this engine until either ShutdownDefaultEventEngine() is called or SetDefaultEventEngine() is called again with a different value. Passing a value of nullptr will cause gRPC to drop the ref it was holding without setting it to a new one.
Earlier calls to GetDefaultEventEngine will still hold a ref to the previous default engine instance, if any.
void grpc_event_engine::experimental::SetEventEngineFactory | ( | absl::AnyInvocable< std::shared_ptr< EventEngine >()> | factory | ) |
[DEPRECATED] Replace gRPC's default EventEngine factory.
Applications may call SetEventEngineFactory at any time to replace the default factory used within gRPC. EventEngines will be created when necessary, when they are otherwise not provided by the application.
To be certain that none of the gRPC-provided built-in EventEngines are created, applications must set a custom EventEngine factory method before grpc is initialized.
void grpc_event_engine::experimental::ShutdownDefaultEventEngine | ( | ) |
Resets gRPC to use one of the default internal EventEngines for all new GetDefaultEventEngine requests and blocks until all refs on the active default engine have been released (destroying that engine).
If you called SetDefaultEventEngine, you must call either ShutdownDefaultEventEngine or SetDefaultEventEngine(nullptr) at the end of your program. If you don't, the engine will never be destroyed.
If you want to reset the default engine to one of gRPC's internal versions without waiting for all references to be released on the current default engine, call SetDefaultEventEngine(nullptr) instead.