|
3 | 3 | TYPE_CHECKING, |
4 | 4 | Any, |
5 | 5 | AsyncIterator, |
| 6 | + Awaitable, |
6 | 7 | Dict, |
7 | 8 | Iterable, |
8 | 9 | Iterator, |
|
38 | 39 | AsyncScriptCommands, |
39 | 40 | DataAccessCommands, |
40 | 41 | FunctionCommands, |
| 42 | + HotkeysMetricsTypes, |
41 | 43 | ManagementCommands, |
42 | 44 | ModuleCommands, |
43 | 45 | PubSubCommands, |
@@ -827,6 +829,54 @@ def client_tracking_off( |
827 | 829 | target_nodes=target_nodes, |
828 | 830 | ) |
829 | 831 |
|
| 832 | + def hotkeys_start( |
| 833 | + self, |
| 834 | + metrics: List[HotkeysMetricsTypes], |
| 835 | + count: Optional[int] = None, |
| 836 | + duration: Optional[int] = None, |
| 837 | + sample_ratio: Optional[int] = None, |
| 838 | + slots: Optional[List[int]] = None, |
| 839 | + **kwargs, |
| 840 | + ) -> Union[str, bytes]: |
| 841 | + """ |
| 842 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 843 | +
|
| 844 | + For more information see https://redis.io/commands/hotkeys-start |
| 845 | + """ |
| 846 | + raise NotImplementedError( |
| 847 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 848 | + ) |
| 849 | + |
| 850 | + def hotkeys_stop(self, **kwargs) -> Union[str, bytes]: |
| 851 | + """ |
| 852 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 853 | +
|
| 854 | + For more information see https://redis.io/commands/hotkeys-stop |
| 855 | + """ |
| 856 | + raise NotImplementedError( |
| 857 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 858 | + ) |
| 859 | + |
| 860 | + def hotkeys_reset(self, **kwargs) -> Union[str, bytes]: |
| 861 | + """ |
| 862 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 863 | +
|
| 864 | + For more information see https://redis.io/commands/hotkeys-reset |
| 865 | + """ |
| 866 | + raise NotImplementedError( |
| 867 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 868 | + ) |
| 869 | + |
| 870 | + def hotkeys_get(self, **kwargs) -> list[dict[Union[str, bytes], Any]]: |
| 871 | + """ |
| 872 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 873 | +
|
| 874 | + For more information see https://redis.io/commands/hotkeys-get |
| 875 | + """ |
| 876 | + raise NotImplementedError( |
| 877 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 878 | + ) |
| 879 | + |
830 | 880 |
|
831 | 881 | class AsyncClusterManagementCommands( |
832 | 882 | ClusterManagementCommands, AsyncManagementCommands |
@@ -924,6 +974,56 @@ async def client_tracking_off( |
924 | 974 | target_nodes=target_nodes, |
925 | 975 | ) |
926 | 976 |
|
| 977 | + async def hotkeys_start( |
| 978 | + self, |
| 979 | + metrics: List[HotkeysMetricsTypes], |
| 980 | + count: Optional[int] = None, |
| 981 | + duration: Optional[int] = None, |
| 982 | + sample_ratio: Optional[int] = None, |
| 983 | + slots: Optional[List[int]] = None, |
| 984 | + **kwargs, |
| 985 | + ) -> Awaitable[Union[str, bytes]]: |
| 986 | + """ |
| 987 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 988 | +
|
| 989 | + For more information see https://redis.io/commands/hotkeys-start |
| 990 | + """ |
| 991 | + raise NotImplementedError( |
| 992 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 993 | + ) |
| 994 | + |
| 995 | + async def hotkeys_stop(self, **kwargs) -> Awaitable[Union[str, bytes]]: |
| 996 | + """ |
| 997 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 998 | +
|
| 999 | + For more information see https://redis.io/commands/hotkeys-stop |
| 1000 | + """ |
| 1001 | + raise NotImplementedError( |
| 1002 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 1003 | + ) |
| 1004 | + |
| 1005 | + async def hotkeys_reset(self, **kwargs) -> Awaitable[Union[str, bytes]]: |
| 1006 | + """ |
| 1007 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 1008 | +
|
| 1009 | + For more information see https://redis.io/commands/hotkeys-reset |
| 1010 | + """ |
| 1011 | + raise NotImplementedError( |
| 1012 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 1013 | + ) |
| 1014 | + |
| 1015 | + async def hotkeys_get( |
| 1016 | + self, **kwargs |
| 1017 | + ) -> Awaitable[list[dict[Union[str, bytes], Any]]]: |
| 1018 | + """ |
| 1019 | + Cluster client does not support hotkeys command. Please use the non-cluster client. |
| 1020 | +
|
| 1021 | + For more information see https://redis.io/commands/hotkeys-get |
| 1022 | + """ |
| 1023 | + raise NotImplementedError( |
| 1024 | + "HOTKEYS commands are not supported in cluster mode. Please use the non-cluster client." |
| 1025 | + ) |
| 1026 | + |
927 | 1027 |
|
928 | 1028 | class ClusterDataAccessCommands(DataAccessCommands): |
929 | 1029 | """ |
|
0 commit comments