This shows how to override the retry policies for dialogflow_es::ConversationProfilesClient:
auto options =
.
set<google::cloud::dialogflow_es::
ConversationProfilesConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
ConversationProfilesRetryPolicyOption>(
ConversationProfilesLimitedErrorCountRetryPolicy(3)
.clone())
ConversationProfilesBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
auto c1 =
auto c2 =
.
set<google::cloud::dialogflow_es::
ConversationProfilesRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
Options & set(ValueTypeT< T > v)
Service for managing ConversationProfiles.
Definition: conversation_profiles_client.h:66
Definition: agents_client.h:33
::google::cloud::internal::LimitedTimeRetryPolicy< dialogflow_es_internal::ConversationProfilesRetryTraits > ConversationProfilesLimitedTimeRetryPolicy
Definition: conversation_profiles_connection.h:47
std::shared_ptr< ConversationProfilesConnection > MakeConversationProfilesConnection(std::string const &location, Options options={})
A factory function to construct an object of type ConversationProfilesConnection.
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
class CustomIdempotencyPolicy
ConversationProfilesConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::dialogflow_es::
ConversationProfilesConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};