5#include <google/rpc/status.pb.h>
6#include <grpcpp/client_context.h>
7#include <grpcpp/impl/codegen/status.h>
9#include <userver/ugrpc/impl/async_method_invocation.hpp>
11USERVER_NAMESPACE_BEGIN
13namespace ugrpc::
client::impl {
19struct ParsedGStatus
final {
21 static ParsedGStatus ProcessStatus(
const grpc::Status& status);
23 std::optional<google::rpc::Status> gstatus;
24 std::optional<std::string> gstatus_string;
29class FinishAsyncMethodInvocation
final
30 :
public ugrpc::impl::AsyncMethodInvocation {
32 explicit FinishAsyncMethodInvocation(RpcData& rpc_data);
34 grpc::Status& GetStatus();
35 ParsedGStatus& GetParsedGStatus();
37 void Notify(
bool ok)
noexcept override;
41 grpc::Status& status_;
42 ParsedGStatus parsed_gstatus_;
45ugrpc::impl::AsyncMethodInvocation::WaitStatus Wait(
46 ugrpc::impl::AsyncMethodInvocation& invocation,
47 grpc::ClientContext& context)
noexcept;