Boost.Redis

    • Introduction
    • Requests and responses
    • Cancellation and timeouts
    • Serializing and parsing into custom types
    • Authentication
    • Logging
    • Sentinel
    • Echo server benchmark
    • Comparison with other Redis clients
    • Examples
    • Reference
    • Acknowledgements
    • Changelog
  • boost::redis::sentinel_config::server_role
arrow_upward

boost::redis::sentinel_config::server_role

Whether to connect to a Redis master or to a replica.

Synopsis

Declared in <boost/redis/config.hpp>

role server_role = role::master;

Description

The library resolves and connects to the Redis master, by default. Set this value to role::replica to connect to one of the replicas of the master identified by master_name. The particular replica will be chosen randomly.

Created with MrDocs