userver: ugrpc::client::ResponseFuture< Response > Class Template Reference
Loading...
Searching...
No Matches
ugrpc::client::ResponseFuture< Response > Class Template Referencefinal

Detailed Description

template<typename Response>
class ugrpc::client::ResponseFuture< Response >

Definition at line 13 of file response_future.hpp.

Public Member Functions

bool IsReady () const noexcept
 Checks if the asynchronous call has completed Note, that once user gets result, IsReady should not be called.
 
engine::FutureStatus WaitUntil (engine::Deadline deadline) const
 Await response until specified timepoint.
 
Response Get ()
 Await and read the response.
 
CallAnyBaseGetCall ()
 Get original gRPC Call.
 

Member Function Documentation

◆ Get()

template<typename Response >
Response ugrpc::client::ResponseFuture< Response >::Get ( )

Await and read the response.

Get should not be called multiple times for the same UnaryFuture.

The connection is not closed, it will be reused for new RPCs.

Returns
the response on success
Exceptions
ugrpc::client::RpcErroron an RPC error
ugrpc::client::RpcCancelledErroron task cancellation

Definition at line 70 of file response_future.hpp.

◆ GetCall()

template<typename Response >
CallAnyBase & ugrpc::client::ResponseFuture< Response >::GetCall ( )

Get original gRPC Call.

Definition at line 76 of file response_future.hpp.

◆ IsReady()

template<typename Response >
bool ugrpc::client::ResponseFuture< Response >::IsReady ( ) const
noexcept

Checks if the asynchronous call has completed Note, that once user gets result, IsReady should not be called.

Returns
true if result ready

Definition at line 60 of file response_future.hpp.

◆ WaitUntil()

template<typename Response >
engine::FutureStatus ugrpc::client::ResponseFuture< Response >::WaitUntil ( engine::Deadline deadline) const

Await response until specified timepoint.

Exceptions
ugrpc::client::RpcErroron an RPC error

Definition at line 65 of file response_future.hpp.


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