userver: userver/ugrpc/client/queue_holder.hpp Source File
Loading...
Searching...
No Matches
queue_holder.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/ugrpc/client/queue_holder.hpp
4/// @brief @copybrief ugrpc::client::QueueHolder
5
6#include <grpcpp/completion_queue.h>
7
8#include <userver/utils/fast_pimpl.hpp>
9
10USERVER_NAMESPACE_BEGIN
11
12namespace ugrpc::client {
13
14/// @brief Manages a gRPC completion queue, usable only in clients
15class QueueHolder final {
16 public:
17 QueueHolder();
18
19 QueueHolder(QueueHolder&&) = delete;
20 QueueHolder& operator=(QueueHolder&&) = delete;
21 ~QueueHolder();
22
23 grpc::CompletionQueue& GetQueue();
24
25 private:
26 struct Impl;
27 utils::FastPimpl<Impl, 176, 16> impl_;
28};
29
30} // namespace ugrpc::client
31
32USERVER_NAMESPACE_END