|
| 1 | +[redis-x-stream](../README.md) / [Exports](../modules.md) / RedisStream |
| 2 | + |
| 3 | +# Class: RedisStream |
| 4 | + |
| 5 | +## Table of contents |
| 6 | + |
| 7 | +### Constructors |
| 8 | + |
| 9 | +- [constructor](RedisStream.md#constructor) |
| 10 | + |
| 11 | +### Properties |
| 12 | + |
| 13 | +- [ackOnIterate](RedisStream.md#ackoniterate) |
| 14 | +- [block](RedisStream.md#block) |
| 15 | +- [buffers](RedisStream.md#buffers) |
| 16 | +- [client](RedisStream.md#client) |
| 17 | +- [consumer](RedisStream.md#consumer) |
| 18 | +- [count](RedisStream.md#count) |
| 19 | +- [deleteOnAck](RedisStream.md#deleteonack) |
| 20 | +- [done](RedisStream.md#done) |
| 21 | +- [first](RedisStream.md#first) |
| 22 | +- [group](RedisStream.md#group) |
| 23 | +- [noack](RedisStream.md#noack) |
| 24 | +- [pendingAcks](RedisStream.md#pendingacks) |
| 25 | +- [streams](RedisStream.md#streams) |
| 26 | + |
| 27 | +### Methods |
| 28 | + |
| 29 | +- [[asyncIterator]](RedisStream.md#[asynciterator]) |
| 30 | +- [ack](RedisStream.md#ack) |
| 31 | +- [quit](RedisStream.md#quit) |
| 32 | +- [return](RedisStream.md#return) |
| 33 | + |
| 34 | +## Constructors |
| 35 | + |
| 36 | +### constructor |
| 37 | + |
| 38 | +• **new RedisStream**(`options`, ...`streams`) |
| 39 | + |
| 40 | +#### Parameters |
| 41 | + |
| 42 | +| Name | Type | |
| 43 | +| :------ | :------ | |
| 44 | +| `options` | `string` \| [`RedisStreamOptions`](../interfaces/RedisStreamOptions.md) | |
| 45 | +| `...streams` | `string`[] | |
| 46 | + |
| 47 | +#### Defined in |
| 48 | + |
| 49 | +[stream.ts:63](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L63) |
| 50 | + |
| 51 | +## Properties |
| 52 | + |
| 53 | +### ackOnIterate |
| 54 | + |
| 55 | +• **ackOnIterate**: `boolean` = `false` |
| 56 | + |
| 57 | +#### Defined in |
| 58 | + |
| 59 | +[stream.ts:35](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L35) |
| 60 | + |
| 61 | +___ |
| 62 | + |
| 63 | +### block |
| 64 | + |
| 65 | +• `Optional` **block**: `number` |
| 66 | + |
| 67 | +#### Defined in |
| 68 | + |
| 69 | +[stream.ts:31](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L31) |
| 70 | + |
| 71 | +___ |
| 72 | + |
| 73 | +### buffers |
| 74 | + |
| 75 | +• **buffers**: `boolean` = `false` |
| 76 | + |
| 77 | +#### Defined in |
| 78 | + |
| 79 | +[stream.ts:32](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L32) |
| 80 | + |
| 81 | +___ |
| 82 | + |
| 83 | +### client |
| 84 | + |
| 85 | +• `Readonly` **client**: `Redis` |
| 86 | + |
| 87 | +'entry' mode will dispense each entry of each stream |
| 88 | +'stream' mode will dispense each stream containing entries |
| 89 | +'batch' mode will dispense all streams with all entries |
| 90 | + |
| 91 | +#### Defined in |
| 92 | + |
| 93 | +[stream.ts:23](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L23) |
| 94 | + |
| 95 | +___ |
| 96 | + |
| 97 | +### consumer |
| 98 | + |
| 99 | +• `Optional` `Readonly` **consumer**: `string` |
| 100 | + |
| 101 | +#### Defined in |
| 102 | + |
| 103 | +[stream.ts:25](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L25) |
| 104 | + |
| 105 | +___ |
| 106 | + |
| 107 | +### count |
| 108 | + |
| 109 | +• **count**: `number` = `100` |
| 110 | + |
| 111 | +#### Defined in |
| 112 | + |
| 113 | +[stream.ts:29](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L29) |
| 114 | + |
| 115 | +___ |
| 116 | + |
| 117 | +### deleteOnAck |
| 118 | + |
| 119 | +• **deleteOnAck**: `boolean` = `false` |
| 120 | + |
| 121 | +#### Defined in |
| 122 | + |
| 123 | +[stream.ts:36](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L36) |
| 124 | + |
| 125 | +___ |
| 126 | + |
| 127 | +### done |
| 128 | + |
| 129 | +• **done**: `boolean` = `false` |
| 130 | + |
| 131 | +Flag for iterable state |
| 132 | + |
| 133 | +#### Defined in |
| 134 | + |
| 135 | +[stream.ts:48](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L48) |
| 136 | + |
| 137 | +___ |
| 138 | + |
| 139 | +### first |
| 140 | + |
| 141 | +• **first**: `boolean` = `false` |
| 142 | + |
| 143 | +#### Defined in |
| 144 | + |
| 145 | +[stream.ts:49](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L49) |
| 146 | + |
| 147 | +___ |
| 148 | + |
| 149 | +### group |
| 150 | + |
| 151 | +• `Optional` `Readonly` **group**: `string` |
| 152 | + |
| 153 | +#### Defined in |
| 154 | + |
| 155 | +[stream.ts:24](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L24) |
| 156 | + |
| 157 | +___ |
| 158 | + |
| 159 | +### noack |
| 160 | + |
| 161 | +• **noack**: `boolean` = `false` |
| 162 | + |
| 163 | +#### Defined in |
| 164 | + |
| 165 | +[stream.ts:30](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L30) |
| 166 | + |
| 167 | +___ |
| 168 | + |
| 169 | +### pendingAcks |
| 170 | + |
| 171 | +• **pendingAcks**: `Map`<`string`, `string`[]\> |
| 172 | + |
| 173 | +Acks waiting to be sent on either: |
| 174 | +- timeout |
| 175 | +- async iteration |
| 176 | + |
| 177 | +#### Defined in |
| 178 | + |
| 179 | +[stream.ts:44](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L44) |
| 180 | + |
| 181 | +___ |
| 182 | + |
| 183 | +### streams |
| 184 | + |
| 185 | +• **streams**: `Map`<`string`, `string`\> |
| 186 | + |
| 187 | +#### Defined in |
| 188 | + |
| 189 | +[stream.ts:28](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L28) |
| 190 | + |
| 191 | +## Methods |
| 192 | + |
| 193 | +### [asyncIterator] |
| 194 | + |
| 195 | +▸ **[asyncIterator]**(): `AsyncIterator`<`XEntryResult`, `any`, `undefined`\> |
| 196 | + |
| 197 | +#### Returns |
| 198 | + |
| 199 | +`AsyncIterator`<`XEntryResult`, `any`, `undefined`\> |
| 200 | + |
| 201 | +#### Defined in |
| 202 | + |
| 203 | +[stream.ts:128](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L128) |
| 204 | + |
| 205 | +___ |
| 206 | + |
| 207 | +### ack |
| 208 | + |
| 209 | +▸ **ack**(`stream`, ...`ids`): `undefined` |
| 210 | + |
| 211 | +#### Parameters |
| 212 | + |
| 213 | +| Name | Type | |
| 214 | +| :------ | :------ | |
| 215 | +| `stream` | `string` | |
| 216 | +| `...ids` | `string`[] | |
| 217 | + |
| 218 | +#### Returns |
| 219 | + |
| 220 | +`undefined` |
| 221 | + |
| 222 | +#### Defined in |
| 223 | + |
| 224 | +[stream.ts:185](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L185) |
| 225 | + |
| 226 | +___ |
| 227 | + |
| 228 | +### quit |
| 229 | + |
| 230 | +▸ **quit**(): `Promise`<`void`\> |
| 231 | + |
| 232 | +#### Returns |
| 233 | + |
| 234 | +`Promise`<`void`\> |
| 235 | + |
| 236 | +#### Defined in |
| 237 | + |
| 238 | +[stream.ts:174](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L174) |
| 239 | + |
| 240 | +___ |
| 241 | + |
| 242 | +### return |
| 243 | + |
| 244 | +▸ `Protected` **return**(): `Promise`<`void`\> |
| 245 | + |
| 246 | +#### Returns |
| 247 | + |
| 248 | +`Promise`<`void`\> |
| 249 | + |
| 250 | +#### Defined in |
| 251 | + |
| 252 | +[stream.ts:195](https://github.com/calebboyd/redis-x-stream/blob/4a00dad/src/stream.ts#L195) |
0 commit comments