RedisSentinelConnectionState
faststream.redis.configs.RedisSentinelConnectionState #
RedisSentinelConnectionState(
options: dict[str, Any] | None = None,
*,
sentinels: Sequence[tuple[str, int]],
master_name: str,
sentinel_kwargs: Mapping[str, Any] | None = None,
)
Bases: RedisConnectionState
Builds the client via Sentinel.master_for for HA / failover.
The underlying SentinelConnectionPool re-discovers the current master on every reconnect, so publishers and stream consumers fail over for free (both go through connection.client).
Source code in faststream/redis/configs/state.py
112 113 114 115 116 117 118 119 120 121 122 123 | |
disconnect async #
disconnect() -> None
Source code in faststream/redis/configs/state.py
75 76 77 78 79 80 | |
connect async #
connect() -> Redis[bytes]
Source code in faststream/redis/configs/state.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |