asio-grpc v3.2.0
Asynchronous gRPC with Asio/unified executors
|
Function to set notification for a grpc::Channel
state change.
More...
#include <agrpc/notify_on_state_change.hpp>
Public Member Functions | |
template<class Deadline , class CompletionToken > | |
auto | operator() (agrpc::GrpcContext &grpc_context, grpc::ChannelInterface &channel, ::grpc_connectivity_state last_observed, Deadline deadline, CompletionToken &&token) const noexcept(detail::IS_USE_SENDER< CompletionToken > &&std::is_nothrow_copy_constructible_v< Deadline >) |
Set notification for a grpc::Channel state change. More... | |
Function to set notification for a grpc::Channel
state change.
Wait for the channel state to change or the specified deadline to expire.
Per-Operation Cancellation
None.
|
inlinenoexcept |
Set notification for a grpc::Channel
state change.
Wait for the channel state to change or the specified deadline to expire.
Example:
deadline | By default gRPC supports two types of deadlines: gpr_timespec and std::chrono::system_clock::time_point . More types can be added by specializing grpc::TimePoint. |
token | A completion token like asio::yield_context or agrpc::use_sender . The completion signature is void(bool) . true if the state changed, false if the deadline expired. |