userver: userver/storages/redis/command_control.hpp File Reference
Loading...
Searching...
No Matches
command_control.hpp File Reference

Detailed Description

Redis command execution options.

Definition in file command_control.hpp.

Go to the source code of this file.

#include <atomic>
#include <chrono>
#include <cstdint>
#include <optional>
#include <string>
#include <userver/storages/redis/impl/types.hpp>
+ This graph shows which files directly or indirectly include this file:

Classes

class  redis::ServerId
 Opaque Id of Redis server instance / any server instance. More...
 
struct  redis::ServerIdHasher
 
struct  redis::RetryNilFromMaster
 
struct  redis::CommandControl
 Redis command execution options. More...
 

Namespaces

namespace  testsuite
 Testsuite integration.
 

Functions

CommandControl::Strategy redis::StrategyFromString (std::string_view s)
 Returns CommandControl::Strategy from string.
 
std::string_view redis::StrategyToString (CommandControl::Strategy s)
 Returns string representation of CommandControl::Strategy.
 

Variables

constexpr std::chrono::milliseconds redis::kDefaultTimeoutSingle {500}
 
constexpr std::chrono::milliseconds redis::kDefaultTimeoutAll {2000}
 
constexpr std::size_t redis::kDefaultMaxRetries {4}
 
constexpr RetryNilFromMaster redis::kRetryNilFromMaster {}
 

Variable Documentation

◆ kDefaultMaxRetries

constexpr std::size_t redis::kDefaultMaxRetries {4}
inlineconstexpr

Definition at line 24 of file command_control.hpp.

◆ kDefaultTimeoutAll

constexpr std::chrono::milliseconds redis::kDefaultTimeoutAll {2000}
inlineconstexpr

Definition at line 23 of file command_control.hpp.

◆ kDefaultTimeoutSingle

constexpr std::chrono::milliseconds redis::kDefaultTimeoutSingle {500}
inlineconstexpr

Definition at line 22 of file command_control.hpp.

◆ kRetryNilFromMaster

constexpr RetryNilFromMaster redis::kRetryNilFromMaster {}
inlineconstexpr

Can be used as an additional parameter in some commands to force retries to master if slave returned a nil reply.

Definition at line 68 of file command_control.hpp.