pub trait AsyncHotkeysCommands:
ConnectionLike
+ Send
+ Sync
+ Sized {
// Provided methods
fn hotkeys_start(&mut self, opts: HotkeysOptions) -> RedisFuture<'_, ()> { ... }
fn hotkeys_get(&mut self) -> RedisFuture<'_, Option<HotkeysResponse>> { ... }
fn hotkeys_stop(&mut self) -> RedisFuture<'_, bool> { ... }
fn hotkeys_reset(&mut self) -> RedisFuture<'_, ()> { ... }
}Expand description
Async version of HOTKEYS commands for standalone async connections (Redis 8.6.0+).
HOTKEYS is a stateful, node-local command requiring session affinity. It is ONLY implemented for standalone connection types and NOT for cluster clients.
Provided Methods§
Sourcefn hotkeys_start(&mut self, opts: HotkeysOptions) -> RedisFuture<'_, ()>
fn hotkeys_start(&mut self, opts: HotkeysOptions) -> RedisFuture<'_, ()>
Start tracking hot keys with the given options.
HOTKEYS START METRICS count [CPU] [NET] [COUNT k] [DURATION seconds] [SAMPLE ratio] [SLOTS count slot [slot ...]]Sourcefn hotkeys_get(&mut self) -> RedisFuture<'_, Option<HotkeysResponse>>
fn hotkeys_get(&mut self) -> RedisFuture<'_, Option<HotkeysResponse>>
Get the current hot keys metrics.
Returns Some(response) when a tracking session state is available
(when there is an active tracking session or when the tracking session has been stopped but not reset)
and None when there is no session state to report (Redis replies Nil in that case).
HOTKEYS GETSourcefn hotkeys_stop(&mut self) -> RedisFuture<'_, bool>
fn hotkeys_stop(&mut self) -> RedisFuture<'_, bool>
Stop tracking hot keys.
Returns true if a tracking session was running and has been stopped,
or false if no session was active (Redis replies Nil in that case).
HOTKEYS STOPSourcefn hotkeys_reset(&mut self) -> RedisFuture<'_, ()>
fn hotkeys_reset(&mut self) -> RedisFuture<'_, ()>
Reset the hot keys tracking state.
Only valid when no tracking session is currently running. Calling RESET while a session is active returns a server error.
HOTKEYS RESETDyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl AsyncHotkeysCommands for MultiplexedConnection
aio only.