asio-grpc v1.6.0
Asynchronous gRPC with Asio/unified executors
agrpc Namespace Reference

Public namespace. More...

Namespaces

namespace  pmr
 Public namespace.
 

Classes

class  AllocatorBinder
 Helper class that associates an allocator to an object. More...
 
class  BasicGrpcExecutor
 GrpcContext's executor. More...
 
class  CancelSafe
 (experimental) Cancellation safety for asynchronous operations More...
 
struct  DefaultPollContextTraits
 (experimental) Default PollContext traits More...
 
class  GrpcContext
 Execution context based on grpc::CompletionQueue More...
 
class  PollContext
 (experimental) Helper class to run a GrpcContext in a different execution context More...
 
class  RepeatedlyRequestContext
 Context passed to the request handler of repeatedly_request. More...
 

Typedefs

using GrpcCancelSafe = agrpc::CancelSafe< bool >
 CancelSafe templated on bool
 
using DefaultCompletionToken = detail::DefaultCompletionToken
 Default completion token for all asynchronous functions. More...
 
using GrpcExecutor = agrpc::BasicGrpcExecutor<>
 Default GrpcExecutor. More...
 
template<class T >
using GrpcAwaitable = asio::awaitable< T, agrpc::GrpcExecutor >
 asio::awaitable specialized on agrpc::GrpcExecutor
 
using GrpcUseAwaitable = asio::use_awaitable_t< agrpc::GrpcExecutor >
 asio::use_awaitable_t specialized on agrpc::GrpcExecutor
 

Functions

template<class Allocator , class Target >
auto bind_allocator (const Allocator &allocator, Target &&target)
 Helper function to create an AllocatorBinder. More...
 

Variables

constexpr detail::GetCompletionQueueFn get_completion_queue {}
 Get grpc::CompletionQueue* from an object. More...
 
constexpr detail::GrpcInitiateFn grpc_initiate {}
 Initiate a gRPC tag-based function. More...
 
constexpr detail::RepeatedlyRequestFn repeatedly_request {}
 Register a request handler for a RPC. More...
 
constexpr detail::RequestFn request {}
 Start a new RPC. More...
 
constexpr detail::ReadFn read {}
 Read from a streaming RPC. More...
 
constexpr detail::WriteFn write {}
 Write to a streaming RPC. More...
 
constexpr detail::WritesDoneFn writes_done {}
 Signal WritesDone to a streaming RPC. More...
 
constexpr detail::FinishFn finish {}
 Finish a RPC. More...
 
constexpr detail::WriteLastFn write_last {}
 Coalesce write and send trailing metadata of a streaming RPC. More...
 
constexpr detail::WriteAndFinishFn write_and_finish {}
 Coalesce write and finish of a streaming RPC. More...
 
constexpr detail::FinishWithErrorFn finish_with_error {}
 Finish a RPC with an error. More...
 
constexpr detail::SendInitialMetadataFn send_initial_metadata {}
 Send initial metadata for a RPC. More...
 
constexpr detail::ReadInitialMetadataFn read_initial_metadata {}
 Read initial metadata for a RPC. More...
 
constexpr agrpc::GrpcUseAwaitable GRPC_USE_AWAITABLE {}
 asio::use_awaitable specialized on agrpc::GrpcExecutor
 
constexpr detail::UseSenderFn use_sender {}
 Create sender completion token. More...
 
constexpr detail::WaitFn wait {}
 Wait for a timer. More...
 

Detailed Description

Public namespace.

Typedef Documentation

◆ DefaultCompletionToken

using agrpc::DefaultCompletionToken = typedef detail::DefaultCompletionToken

Default completion token for all asynchronous functions.

Only available for Boost.Asio and standalone Asio: asio::use_awaitable

◆ GrpcExecutor

Default GrpcExecutor.

The default GrpcExecutor does not track outstanding work, has the relationship.fork and blocking.never properties and uses the default allocator (std::allocator<void>).

Function Documentation

◆ bind_allocator()

template<class Allocator , class Target >
auto agrpc::bind_allocator ( const Allocator &  allocator,
Target &&  target 
)

Helper function to create an AllocatorBinder.

Since
1.5.0

Variable Documentation

◆ finish

constexpr detail::FinishFn agrpc::finish {}
inlineconstexpr

◆ finish_with_error

constexpr detail::FinishWithErrorFn agrpc::finish_with_error {}
inlineconstexpr

◆ get_completion_queue

constexpr detail::GetCompletionQueueFn agrpc::get_completion_queue {}
inlineconstexpr

Get grpc::CompletionQueue* from an object.

Function to get CompletionQueue from objects.

◆ grpc_initiate

constexpr detail::GrpcInitiateFn agrpc::grpc_initiate {}
inlineconstexpr

Initiate a gRPC tag-based function.

Function to initiate gRPC tag-based functions.

◆ read

constexpr detail::ReadFn agrpc::read {}
inlineconstexpr

◆ read_initial_metadata

constexpr detail::ReadInitialMetadataFn agrpc::read_initial_metadata {}
inlineconstexpr

◆ repeatedly_request

constexpr detail::RepeatedlyRequestFn agrpc::repeatedly_request {}
inlineconstexpr

Register a request handler for a RPC.

Server-side function to register request handlers.

◆ request

constexpr detail::RequestFn agrpc::request {}
inlineconstexpr

◆ send_initial_metadata

constexpr detail::SendInitialMetadataFn agrpc::send_initial_metadata {}
inlineconstexpr

◆ use_sender

constexpr detail::UseSenderFn agrpc::use_sender {}
inlineconstexpr

Create sender completion token.

Function to create sender completion tokens.

◆ wait

constexpr detail::WaitFn agrpc::wait {}
inlineconstexpr

◆ write

constexpr detail::WriteFn agrpc::write {}
inlineconstexpr

◆ write_and_finish

constexpr detail::WriteAndFinishFn agrpc::write_and_finish {}
inlineconstexpr

Coalesce write and finish of a streaming RPC.

Server-side function to coalesce write and finish of streaming RPCs.

◆ write_last

constexpr detail::WriteLastFn agrpc::write_last {}
inlineconstexpr

◆ writes_done

constexpr detail::WritesDoneFn agrpc::writes_done {}
inlineconstexpr