Commit ac37c7f
authored
Go: pubsub shardchannels (valkey-io#3695)
* Add PubSubHandler interface and GetQueue method to BaseClient; enhance PubSubMessageQueue with signal channel support; refactor integration tests to utilize new client creation methods and improve message handling.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Refactor PubSub integration tests to consolidate message receipt patterns into a single comprehensive test function, improving maintainability and readability. This change introduces a parameterized approach to test various client types and message reading methods.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Refactor and enhance PubSub integration tests by consolidating message verification logic and introducing parameterized tests for various client types and message reading methods. This update improves test maintainability and readability while ensuring comprehensive coverage of PubSub functionality.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Add PubSubChannels and PubSubChannelsWithPattern methods to baseClient for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Enhance client management by adding strong reference checks in close_client function. Update Go module dependencies to include new libraries for improved functionality. Refactor baseClient methods for PubSubChannels and PubSubChannelsWithPattern, ensuring proper error handling and client closure in tests.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* fix formatting
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Add PubSubNumPat method to baseClient for counting unique subscribed patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Add PubSub NumSub
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Refactor PubSubNumSub method in baseClient to simplify response handling and improve readability. Update related tests for clarity and consistency in naming conventions. Add new integration tests for PubSubNumSub functionality across standalone and cluster clients.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* fix merge errors
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Add PubSubChannels and PubSubChannelsWithPattern methods to baseClient for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* fix formatting
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* Add PubSubNumPat method to baseClient for counting unique subscribed patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* sharded publish
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* implement sharded mode support in pubsub tests for subscriptions and publishing
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* add pubsub shardchannels command
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* add guard for server version in integration test
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
* fix merge errors
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
---------
Signed-off-by: jbrinkman <joe.brinkman@improving.com>1 parent f193f1e commit ac37c7f
File tree
5 files changed
+145
-5
lines changed- go
- api
- integTest
5 files changed
+145
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
158 | 200 | | |
159 | 201 | | |
160 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
64 | 95 | | |
65 | 96 | | |
66 | 97 | | |
67 | 98 | | |
68 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
69 | 103 | | |
70 | 104 | | |
71 | 105 | | |
72 | | - | |
| 106 | + | |
73 | 107 | | |
74 | 108 | | |
75 | 109 | | |
| |||
82 | 116 | | |
83 | 117 | | |
84 | 118 | | |
85 | | - | |
86 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
87 | 130 | | |
88 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
89 | 136 | | |
90 | 137 | | |
91 | 138 | | |
| |||
0 commit comments