#include <userver/ugrpc/client/call_options.hpp>
Options passed to interface calls.
Definition at line 25 of file call_options.hpp.
Public Member Functions | |
void | AddMetadata (std::string_view meta_key, std::string_view meta_value) |
Add the (meta_key, meta_value) pair to the metadata associated with a client call. | |
void | SetAttempts (int attempts) |
int | GetAttempts () const |
void | SetTimeout (std::chrono::milliseconds timeout) |
std::chrono::milliseconds | GetTimeout () const |
using | ClientContextFactory = utils::move_only_function< std::unique_ptr< grpc::ClientContext >() const > |
void | SetClientContextFactory (ClientContextFactory &&client_context_factory) |
using ugrpc::client::CallOptions::ClientContextFactory = utils::move_only_function<std::unique_ptr<grpc::ClientContext>() const> |
Set custom grpc::ClientContext factory.
'client_context_factory' may be called zero, once or more time, because of retries.
Definition at line 49 of file call_options.hpp.
void ugrpc::client::CallOptions::SetAttempts | ( | int | attempts | ) |
Set and get retry attempts. Maximum number of retry attempts, including the original attempt.
void ugrpc::client::CallOptions::SetTimeout | ( | std::chrono::milliseconds | timeout | ) |
Set and get operation timeout.
In case of retries timeout
applies to each attempt. Maximum time on call may actually be timeout * attempts + sum(backoff_i)