6#include <grpcpp/channel.h>
7#include <grpcpp/completion_queue.h>
8#include <grpcpp/security/credentials.h>
10#include <userver/engine/deadline.hpp>
11#include <userver/engine/task/task_processor_fwd.hpp>
13#include <userver/ugrpc/client/impl/client_data.hpp>
15USERVER_NAMESPACE_BEGIN
21[[nodiscard]]
bool TryWaitForConnected(
22 grpc::Channel& channel,
23 grpc::CompletionQueue& queue,
24 engine::Deadline deadline,
25 engine::TaskProcessor& blocking_task_processor
28[[nodiscard]]
bool TryWaitForConnected(
29 impl::ChannelCache::Token& token,
30 grpc::CompletionQueue& queue,
31 engine::Deadline deadline,
32 engine::TaskProcessor& blocking_task_processor
50 engine::TaskProcessor& blocking_task_processor,
51 std::shared_ptr<grpc::ChannelCredentials> channel_credentials,
52 const std::string& endpoint
60template <
typename Client>
62TryWaitForConnected(Client& client, engine::Deadline deadline, engine::TaskProcessor& blocking_task_processor) {
63 return impl::TryWaitForConnected(
64 impl::GetClientData(client).GetChannelToken(),
65 impl::GetClientData(client).NextQueue(),
67 blocking_task_processor