@hotmeshio/hotmesh 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/modules/enums.js +1 -10
- package/build/modules/key.d.ts +0 -38
- package/build/modules/key.js +4 -46
- package/build/modules/utils.d.ts +0 -8
- package/build/modules/utils.js +0 -14
- package/build/package.json +11 -4
- package/build/services/activities/activity.d.ts +0 -28
- package/build/services/activities/activity.js +1 -46
- package/build/services/activities/await.js +0 -4
- package/build/services/activities/cycle.d.ts +0 -7
- package/build/services/activities/cycle.js +1 -16
- package/build/services/activities/hook.d.ts +0 -6
- package/build/services/activities/hook.js +2 -12
- package/build/services/activities/interrupt.js +0 -8
- package/build/services/activities/signal.d.ts +0 -6
- package/build/services/activities/signal.js +0 -15
- package/build/services/activities/trigger.d.ts +0 -4
- package/build/services/activities/trigger.js +1 -7
- package/build/services/activities/worker.js +0 -4
- package/build/services/collator/index.d.ts +0 -70
- package/build/services/collator/index.js +1 -91
- package/build/services/compiler/deployer.js +6 -38
- package/build/services/compiler/index.d.ts +0 -15
- package/build/services/compiler/index.js +0 -20
- package/build/services/compiler/validator.d.ts +0 -3
- package/build/services/compiler/validator.js +0 -25
- package/build/services/connector/clients/ioredis.d.ts +2 -2
- package/build/services/connector/clients/ioredis.js +0 -2
- package/build/services/connector/clients/redis.d.ts +4 -4
- package/build/services/connector/clients/redis.js +1 -3
- package/build/services/connector/index.d.ts +1 -1
- package/build/services/connector/index.js +0 -2
- package/build/services/durable/client.d.ts +1 -26
- package/build/services/durable/client.js +0 -56
- package/build/services/durable/exporter.d.ts +0 -22
- package/build/services/durable/exporter.js +1 -30
- package/build/services/durable/handle.d.ts +0 -36
- package/build/services/durable/handle.js +0 -46
- package/build/services/durable/index.d.ts +0 -4
- package/build/services/durable/index.js +0 -4
- package/build/services/durable/schemas/factory.d.ts +0 -29
- package/build/services/durable/schemas/factory.js +0 -29
- package/build/services/durable/search.d.ts +1 -36
- package/build/services/durable/search.js +57 -56
- package/build/services/durable/worker.js +2 -22
- package/build/services/durable/workflow.d.ts +0 -114
- package/build/services/durable/workflow.js +1 -141
- package/build/services/engine/index.d.ts +1 -6
- package/build/services/engine/index.js +1 -43
- package/build/services/exporter/index.d.ts +0 -27
- package/build/services/exporter/index.js +0 -33
- package/build/services/hotmesh/index.d.ts +2 -2
- package/build/services/hotmesh/index.js +1 -9
- package/build/services/logger/index.js +0 -2
- package/build/services/mapper/index.d.ts +0 -14
- package/build/services/mapper/index.js +0 -14
- package/build/services/pipe/functions/date.d.ts +0 -7
- package/build/services/pipe/functions/date.js +0 -7
- package/build/services/pipe/functions/math.js +0 -2
- package/build/services/pipe/index.d.ts +0 -15
- package/build/services/pipe/index.js +2 -23
- package/build/services/quorum/index.d.ts +0 -7
- package/build/services/quorum/index.js +0 -21
- package/build/services/reporter/index.d.ts +0 -5
- package/build/services/reporter/index.js +0 -9
- package/build/services/router/index.d.ts +0 -9
- package/build/services/router/index.js +2 -38
- package/build/services/serializer/index.js +7 -26
- package/build/services/store/cache.d.ts +0 -18
- package/build/services/store/cache.js +0 -18
- package/build/services/store/clients/ioredis.d.ts +1 -1
- package/build/services/store/clients/ioredis.js +0 -1
- package/build/services/store/clients/redis.d.ts +1 -1
- package/build/services/store/index.d.ts +0 -55
- package/build/services/store/index.js +5 -81
- package/build/services/stream/clients/ioredis.d.ts +1 -1
- package/build/services/stream/clients/ioredis.js +1 -4
- package/build/services/stream/clients/redis.d.ts +1 -1
- package/build/services/sub/clients/ioredis.d.ts +1 -1
- package/build/services/sub/clients/redis.d.ts +1 -1
- package/build/services/task/index.d.ts +0 -9
- package/build/services/task/index.js +0 -31
- package/build/services/telemetry/index.d.ts +0 -7
- package/build/services/telemetry/index.js +1 -13
- package/build/services/worker/index.d.ts +0 -4
- package/build/services/worker/index.js +2 -6
- package/build/types/activity.d.ts +0 -81
- package/build/types/durable.d.ts +25 -177
- package/build/types/exporter.d.ts +0 -13
- package/build/types/hotmesh.d.ts +4 -16
- package/build/types/hotmesh.js +0 -3
- package/build/types/index.d.ts +4 -6
- package/build/types/index.js +4 -3
- package/build/types/job.d.ts +1 -86
- package/build/types/pipe.d.ts +0 -65
- package/build/types/quorum.d.ts +15 -10
- package/build/types/redis.d.ts +225 -7
- package/build/types/redis.js +9 -0
- package/build/types/stream.d.ts +0 -58
- package/build/types/stream.js +0 -4
- package/package.json +11 -4
- package/types/durable.ts +121 -3
- package/types/hotmesh.ts +3 -6
- package/types/index.ts +23 -10
- package/types/job.ts +1 -1
- package/types/quorum.ts +22 -0
- package/types/redis.ts +267 -18
- package/build/types/ioredisclient.d.ts +0 -5
- package/build/types/ioredisclient.js +0 -5
- package/build/types/redisclient.d.ts +0 -26
- package/build/types/redisclient.js +0 -2
- package/modules/enums.ts +0 -62
- package/modules/errors.ts +0 -280
- package/modules/key.ts +0 -101
- package/modules/storage.ts +0 -3
- package/modules/utils.ts +0 -242
- package/services/activities/activity.ts +0 -589
- package/services/activities/await.ts +0 -113
- package/services/activities/cycle.ts +0 -115
- package/services/activities/hook.ts +0 -197
- package/services/activities/index.ts +0 -19
- package/services/activities/interrupt.ts +0 -172
- package/services/activities/signal.ts +0 -148
- package/services/activities/trigger.ts +0 -295
- package/services/activities/worker.ts +0 -107
- package/services/collator/README.md +0 -102
- package/services/collator/index.ts +0 -291
- package/services/compiler/deployer.ts +0 -504
- package/services/compiler/index.ts +0 -98
- package/services/compiler/validator.ts +0 -158
- package/services/connector/clients/ioredis.ts +0 -57
- package/services/connector/clients/redis.ts +0 -72
- package/services/connector/index.ts +0 -42
- package/services/durable/client.ts +0 -266
- package/services/durable/connection.ts +0 -10
- package/services/durable/exporter.ts +0 -232
- package/services/durable/handle.ts +0 -160
- package/services/durable/index.ts +0 -27
- package/services/durable/schemas/factory.ts +0 -2358
- package/services/durable/search.ts +0 -196
- package/services/durable/worker.ts +0 -401
- package/services/durable/workflow.ts +0 -557
- package/services/engine/index.ts +0 -761
- package/services/exporter/index.ts +0 -146
- package/services/hotmesh/index.ts +0 -237
- package/services/logger/index.ts +0 -79
- package/services/mapper/index.ts +0 -89
- package/services/pipe/functions/array.ts +0 -78
- package/services/pipe/functions/bitwise.ts +0 -27
- package/services/pipe/functions/conditional.ts +0 -35
- package/services/pipe/functions/date.ts +0 -220
- package/services/pipe/functions/index.ts +0 -27
- package/services/pipe/functions/json.ts +0 -11
- package/services/pipe/functions/logical.ts +0 -11
- package/services/pipe/functions/math.ts +0 -217
- package/services/pipe/functions/number.ts +0 -75
- package/services/pipe/functions/object.ts +0 -98
- package/services/pipe/functions/string.ts +0 -86
- package/services/pipe/functions/symbol.ts +0 -39
- package/services/pipe/functions/unary.ts +0 -19
- package/services/pipe/index.ts +0 -216
- package/services/quorum/index.ts +0 -319
- package/services/reporter/index.ts +0 -387
- package/services/router/index.ts +0 -426
- package/services/serializer/README.md +0 -10
- package/services/serializer/index.ts +0 -285
- package/services/store/cache.ts +0 -172
- package/services/store/clients/ioredis.ts +0 -145
- package/services/store/clients/redis.ts +0 -191
- package/services/store/index.ts +0 -1091
- package/services/stream/clients/ioredis.ts +0 -157
- package/services/stream/clients/redis.ts +0 -158
- package/services/stream/index.ts +0 -58
- package/services/sub/clients/ioredis.ts +0 -83
- package/services/sub/clients/redis.ts +0 -74
- package/services/sub/index.ts +0 -25
- package/services/task/index.ts +0 -250
- package/services/telemetry/index.ts +0 -273
- package/services/worker/index.ts +0 -248
- package/types/ioredisclient.ts +0 -10
- package/types/redisclient.ts +0 -30
package/build/types/stream.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StreamRole = exports.StreamDataType = exports.StreamStatus = void 0;
|
|
4
|
-
/** Enumerated status values for stream operations */
|
|
5
4
|
var StreamStatus;
|
|
6
5
|
(function (StreamStatus) {
|
|
7
|
-
/** Indicates successful completion of the stream operation */
|
|
8
6
|
StreamStatus["SUCCESS"] = "success";
|
|
9
|
-
/** Indicates an error occurred during the stream operation */
|
|
10
7
|
StreamStatus["ERROR"] = "error";
|
|
11
|
-
/** Indicates the stream operation is still pending */
|
|
12
8
|
StreamStatus["PENDING"] = "pending";
|
|
13
9
|
})(StreamStatus = exports.StreamStatus || (exports.StreamStatus = {}));
|
|
14
10
|
var StreamDataType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/hotmesh",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
4
4
|
"description": "Unbreakable Workflows",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -65,11 +65,14 @@
|
|
|
65
65
|
},
|
|
66
66
|
"keywords": [
|
|
67
67
|
"durable workflow",
|
|
68
|
-
"
|
|
68
|
+
"HotMesh",
|
|
69
69
|
"service mesh",
|
|
70
70
|
"workflows",
|
|
71
71
|
"operational data",
|
|
72
|
-
"
|
|
72
|
+
"Redis",
|
|
73
|
+
"OLAP",
|
|
74
|
+
"OLTP",
|
|
75
|
+
"HTAP"
|
|
73
76
|
],
|
|
74
77
|
"author": "luke.birdeau@gmail.com",
|
|
75
78
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -90,11 +93,15 @@
|
|
|
90
93
|
"eslint": "^8.36.0",
|
|
91
94
|
"ioredis": "^5.3.2",
|
|
92
95
|
"jest": "^29.5.0",
|
|
93
|
-
"redis": "^4.6.
|
|
96
|
+
"redis": "^4.6.13",
|
|
94
97
|
"rimraf": "^4.4.1",
|
|
95
98
|
"ts-jest": "^29.0.5",
|
|
96
99
|
"ts-node": "^10.9.1",
|
|
97
100
|
"ts-node-dev": "^2.0.0",
|
|
98
101
|
"typescript": "^5.0.4"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"redis": "^4.0.0",
|
|
105
|
+
"ioredis": "^4.0.0 || ^5.0.0"
|
|
99
106
|
}
|
|
100
107
|
}
|
package/types/durable.ts
CHANGED
|
@@ -110,6 +110,7 @@ type WorkflowContext = {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
type WorkflowSearchOptions = {
|
|
113
|
+
|
|
113
114
|
/** FT index name (myapp:myindex) */
|
|
114
115
|
index?: string;
|
|
115
116
|
|
|
@@ -119,13 +120,110 @@ type WorkflowSearchOptions = {
|
|
|
119
120
|
/**
|
|
120
121
|
* Schema mapping each field to a type with an optional sortable flag
|
|
121
122
|
*/
|
|
122
|
-
schema?: Record<string, {
|
|
123
|
+
schema?: Record<string, {
|
|
124
|
+
/**
|
|
125
|
+
* The FT.SEARCH field type. One of: TEXT, NUMERIC, TAG. TEXT is
|
|
126
|
+
* most expensive, but also most expressive.
|
|
127
|
+
*/
|
|
128
|
+
type: 'TEXT' | 'NUMERIC' | 'TAG';
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* FT.SEARCH SORTABLE field. If true, results may be sorted according to this field
|
|
132
|
+
* @default false
|
|
133
|
+
*/
|
|
134
|
+
sortable?: boolean;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* FT.SEARCH NOSTEM field. applies to TEXT fields types.
|
|
138
|
+
* If true, the text field index will not stem words
|
|
139
|
+
* @default false
|
|
140
|
+
*/
|
|
141
|
+
nostem?: boolean;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* FT.SEARCH NOINDEX field. If true and if the field is sortable, the field will aid
|
|
145
|
+
* in sorting results but not be directly indexed as a standalone
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
noindex?: boolean;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* if true, the field is indexed and searchable within the FT.SEARCH index
|
|
152
|
+
* This is different from `noindex` which is FT.SEARCH specific and relates
|
|
153
|
+
* to sorting and indexing. This is a general flag for the field that will
|
|
154
|
+
* enable or disable indexing and searching entirely. Use for fields with
|
|
155
|
+
* absolutely no meaning to query or sorting but which are important
|
|
156
|
+
* nonetheless as part of the data record that is saved and returned.
|
|
157
|
+
* @default true
|
|
158
|
+
*/
|
|
159
|
+
indexed?: boolean;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* An array of possible values for the field
|
|
163
|
+
*/
|
|
164
|
+
examples?: string[];
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The 'nilable' setting may NOT be set to `true` for
|
|
168
|
+
* NUMBER types as it causes an indexing error;
|
|
169
|
+
* consider a custom (e.g., negative number) value to represent
|
|
170
|
+
* `null` if desired for a NUMERIC field.
|
|
171
|
+
* Set to true only if the field is a TEXT or TAG type and
|
|
172
|
+
* you wish to save the string `null` as a value to search
|
|
173
|
+
* on (the tag, {null}, or the string, (null)
|
|
174
|
+
* @default false
|
|
175
|
+
*/
|
|
176
|
+
nilable?: boolean;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* possible scalar/primitive types for the field. Use when
|
|
180
|
+
* serializing and restoring data to ensure the field is
|
|
181
|
+
* properly typed. If not provided, the field will be
|
|
182
|
+
* treated as a string.
|
|
183
|
+
*/
|
|
184
|
+
primitive?: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* if true, the field is required to be present in the data record
|
|
188
|
+
* @default false
|
|
189
|
+
*/
|
|
190
|
+
required?: boolean;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* an enumerated list of allowed values; if field is nilable, it is implied
|
|
194
|
+
* and therefore not necessary to include `null` in the list
|
|
195
|
+
* @default []
|
|
196
|
+
*/
|
|
197
|
+
enum?: string[];
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* a regular expression pattern for the field
|
|
201
|
+
* @default '.*'
|
|
202
|
+
* @example '^[a-zA-Z0-9_]*$'
|
|
203
|
+
*/
|
|
204
|
+
pattern?: string;
|
|
205
|
+
}>;
|
|
123
206
|
|
|
124
207
|
/** Additional data as a key-value record */
|
|
125
208
|
data?: StringStringType;
|
|
126
209
|
}
|
|
127
210
|
|
|
128
211
|
|
|
212
|
+
type SearchResults = {
|
|
213
|
+
/**
|
|
214
|
+
* the total number of results
|
|
215
|
+
*/
|
|
216
|
+
count: number,
|
|
217
|
+
/**
|
|
218
|
+
* the raw FT.SEARCH query string
|
|
219
|
+
*/
|
|
220
|
+
query: string,
|
|
221
|
+
/**
|
|
222
|
+
* the raw FT.SEARCH results as an array of objects
|
|
223
|
+
*/
|
|
224
|
+
data: StringStringType[]
|
|
225
|
+
};
|
|
226
|
+
|
|
129
227
|
type WorkflowOptions = {
|
|
130
228
|
|
|
131
229
|
/**
|
|
@@ -280,8 +378,8 @@ type WorkflowDataType = {
|
|
|
280
378
|
}
|
|
281
379
|
|
|
282
380
|
type ConnectionConfig = {
|
|
283
|
-
class: RedisClass
|
|
284
|
-
options: RedisOptions
|
|
381
|
+
class: Partial<RedisClass>;
|
|
382
|
+
options: Partial<RedisOptions>;
|
|
285
383
|
}
|
|
286
384
|
type Connection = ConnectionConfig;
|
|
287
385
|
|
|
@@ -328,6 +426,7 @@ type FindOptions = {
|
|
|
328
426
|
taskQueue?: string;
|
|
329
427
|
namespace?: string;
|
|
330
428
|
index?: string;
|
|
429
|
+
search?: WorkflowSearchOptions;
|
|
331
430
|
}
|
|
332
431
|
|
|
333
432
|
type FindWhereOptions = {
|
|
@@ -341,6 +440,23 @@ type FindWhereOptions = {
|
|
|
341
440
|
}
|
|
342
441
|
}
|
|
343
442
|
|
|
443
|
+
type FindJobsOptions = {
|
|
444
|
+
/** The workflow name; include an asterisk for wilcard search; refer to Redis SCAN for the allowed format */
|
|
445
|
+
match?: string;
|
|
446
|
+
|
|
447
|
+
/** application namespace; defaults to 'durable' */
|
|
448
|
+
namespace?: string;
|
|
449
|
+
|
|
450
|
+
/** The suggested response limit. Reduce batch size to reduce the likelihood of large overages. */
|
|
451
|
+
limit?: number;
|
|
452
|
+
|
|
453
|
+
/** How many records to scan at a time */
|
|
454
|
+
batch?: number;
|
|
455
|
+
|
|
456
|
+
/** The start cursor; defaults to 0 */
|
|
457
|
+
cursor?: string;
|
|
458
|
+
}
|
|
459
|
+
|
|
344
460
|
type WorkerOptions = {
|
|
345
461
|
/** Log level: debug, info, warn, error */
|
|
346
462
|
logLevel?: LogLevel;
|
|
@@ -422,10 +538,12 @@ export {
|
|
|
422
538
|
ProxyType,
|
|
423
539
|
Registry,
|
|
424
540
|
SignalOptions,
|
|
541
|
+
FindJobsOptions,
|
|
425
542
|
FindOptions,
|
|
426
543
|
FindWhereOptions,
|
|
427
544
|
FindWhereQuery,
|
|
428
545
|
HookOptions,
|
|
546
|
+
SearchResults,
|
|
429
547
|
WorkerConfig,
|
|
430
548
|
WorkflowConfig,
|
|
431
549
|
WorkerOptions,
|
package/types/hotmesh.ts
CHANGED
|
@@ -50,8 +50,8 @@ type KeyStoreParams = {
|
|
|
50
50
|
type HotMesh = typeof HotMeshService;
|
|
51
51
|
|
|
52
52
|
type RedisConfig = {
|
|
53
|
-
class: RedisClass
|
|
54
|
-
options: RedisOptions
|
|
53
|
+
class: Partial<RedisClass>;
|
|
54
|
+
options: Partial<RedisOptions>;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
type HotMeshEngine = {
|
|
@@ -68,10 +68,7 @@ type HotMeshWorker = {
|
|
|
68
68
|
store?: RedisClient; //set by hotmesh using instanced `redis` class
|
|
69
69
|
stream?: RedisClient; //set by hotmesh using instanced `redis` class
|
|
70
70
|
sub?: RedisClient; //set by hotmesh using instanced `redis` class
|
|
71
|
-
redis?:
|
|
72
|
-
class: RedisClass;
|
|
73
|
-
options: RedisOptions;
|
|
74
|
-
};
|
|
71
|
+
redis?: RedisConfig;
|
|
75
72
|
reclaimDelay?: number; //milliseconds
|
|
76
73
|
reclaimCount?: number; //max number of times to reclaim a stream
|
|
77
74
|
callback: (payload: StreamData) => Promise<StreamDataResponse|void>;
|
package/types/index.ts
CHANGED
|
@@ -39,10 +39,12 @@ export {
|
|
|
39
39
|
ProxyType,
|
|
40
40
|
Registry,
|
|
41
41
|
SignalOptions,
|
|
42
|
+
FindJobsOptions,
|
|
42
43
|
FindOptions,
|
|
43
44
|
FindWhereOptions,
|
|
44
45
|
FindWhereQuery,
|
|
45
46
|
HookOptions,
|
|
47
|
+
SearchResults,
|
|
46
48
|
WorkflowConfig,
|
|
47
49
|
WorkerConfig,
|
|
48
50
|
WorkerOptions,
|
|
@@ -78,19 +80,18 @@ export {
|
|
|
78
80
|
HookRules,
|
|
79
81
|
HookSignal
|
|
80
82
|
} from './hook';
|
|
81
|
-
export {
|
|
82
|
-
RedisClientType as IORedisClientType,
|
|
83
|
-
RedisMultiType as IORedisMultiType } from './ioredisclient';
|
|
84
83
|
export { ILogger } from './logger';
|
|
85
84
|
export {
|
|
85
|
+
ExtensionType,
|
|
86
|
+
JobCompletionOptions,
|
|
86
87
|
JobData,
|
|
87
88
|
JobsData,
|
|
89
|
+
JobInterruptOptions,
|
|
88
90
|
JobMetadata,
|
|
89
91
|
JobOutput,
|
|
90
92
|
JobState,
|
|
91
93
|
JobStatus,
|
|
92
|
-
PartialJobState
|
|
93
|
-
ExtensionType } from './job';
|
|
94
|
+
PartialJobState } from './job';
|
|
94
95
|
export { MappingStatements } from './map';
|
|
95
96
|
export {
|
|
96
97
|
Pipe,
|
|
@@ -123,18 +124,30 @@ export {
|
|
|
123
124
|
QuorumMessageCallback,
|
|
124
125
|
QuorumProfile,
|
|
125
126
|
RollCallMessage,
|
|
127
|
+
RollCallOptions,
|
|
126
128
|
SubscriptionCallback,
|
|
129
|
+
SubscriptionOptions,
|
|
127
130
|
SystemHealth,
|
|
128
131
|
ThrottleMessage,
|
|
129
132
|
ThrottleOptions,
|
|
130
133
|
WorkMessage } from './quorum';
|
|
131
134
|
export {
|
|
132
|
-
|
|
135
|
+
RedisClass,
|
|
136
|
+
RedisRedisClientType,
|
|
137
|
+
RedisRedisClientOptions,
|
|
138
|
+
RedisRedisClassType,
|
|
139
|
+
IORedisClientType,
|
|
133
140
|
RedisClient,
|
|
134
|
-
RedisMulti
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
RedisMulti,
|
|
142
|
+
RedisRedisMultiType,
|
|
143
|
+
IORedisClientOptions,
|
|
144
|
+
IORedisClassType,
|
|
145
|
+
IORedisMultiType,
|
|
146
|
+
RedisOptions,
|
|
147
|
+
MultiResponseFlags,
|
|
148
|
+
isRedisClient,
|
|
149
|
+
isIORedisClient,
|
|
150
|
+
} from './redis'; //common redis types
|
|
138
151
|
export {
|
|
139
152
|
JSONSchema,
|
|
140
153
|
StringAnyType,
|
package/types/job.ts
CHANGED
package/types/quorum.ts
CHANGED
|
@@ -32,14 +32,21 @@ export type ThrottleOptions = {
|
|
|
32
32
|
guid?: string;
|
|
33
33
|
/** target a worker quorum */
|
|
34
34
|
topic?: string;
|
|
35
|
+
/** entity/noun */
|
|
36
|
+
entity?: string;
|
|
35
37
|
/** in milliseconds; default is 0 */
|
|
36
38
|
throttle: number;
|
|
39
|
+
/** namespace
|
|
40
|
+
* @default 'durable'
|
|
41
|
+
*/
|
|
42
|
+
namespace?: string;
|
|
37
43
|
};
|
|
38
44
|
|
|
39
45
|
export interface QuorumProfile {
|
|
40
46
|
namespace: string;
|
|
41
47
|
app_id: string;
|
|
42
48
|
engine_id: string;
|
|
49
|
+
entity?: string;
|
|
43
50
|
worker_topic?: string;
|
|
44
51
|
stream?: string;
|
|
45
52
|
stream_depth?: number;
|
|
@@ -54,6 +61,7 @@ export interface QuorumProfile {
|
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
interface QuorumMessageBase {
|
|
64
|
+
entity?: string;
|
|
57
65
|
guid?: string;
|
|
58
66
|
topic?: string;
|
|
59
67
|
type?: string;
|
|
@@ -80,6 +88,7 @@ export interface PongMessage extends QuorumMessageBase {
|
|
|
80
88
|
type: 'pong';
|
|
81
89
|
guid: string; //call initiator
|
|
82
90
|
originator: string; //clone of originator guid passed in ping
|
|
91
|
+
entity?: string; //optional entity
|
|
83
92
|
profile?: QuorumProfile; //contains details about the engine/worker
|
|
84
93
|
}
|
|
85
94
|
|
|
@@ -91,6 +100,7 @@ export interface ActivateMessage extends QuorumMessageBase {
|
|
|
91
100
|
|
|
92
101
|
export interface JobMessage extends QuorumMessageBase {
|
|
93
102
|
type: 'job';
|
|
103
|
+
entity?: string;
|
|
94
104
|
topic: string; //this comes from the 'publishes' field in the YAML
|
|
95
105
|
job: JobOutput
|
|
96
106
|
}
|
|
@@ -98,6 +108,7 @@ export interface JobMessage extends QuorumMessageBase {
|
|
|
98
108
|
export interface ThrottleMessage extends QuorumMessageBase {
|
|
99
109
|
type: 'throttle';
|
|
100
110
|
guid?: string; //target engine AND workers with this guid
|
|
111
|
+
entity?: string;
|
|
101
112
|
topic?: string; //target worker(s) matching this topic (pass null to only target the engine, pass undefined to target engine and workers)
|
|
102
113
|
throttle: number; //0-n; millis
|
|
103
114
|
}
|
|
@@ -105,6 +116,7 @@ export interface ThrottleMessage extends QuorumMessageBase {
|
|
|
105
116
|
export interface RollCallMessage extends QuorumMessageBase {
|
|
106
117
|
type: 'rollcall';
|
|
107
118
|
guid?: string; //target the engine quorum
|
|
119
|
+
entity?: string;
|
|
108
120
|
topic?: string | null; //target a worker if string; suppress if `null`;
|
|
109
121
|
interval: number; //every 'n' seconds
|
|
110
122
|
max?: number; //max broadcasts
|
|
@@ -123,6 +135,16 @@ export interface QuorumMessageCallback {
|
|
|
123
135
|
(topic: string, message: QuorumMessage): void;
|
|
124
136
|
}
|
|
125
137
|
|
|
138
|
+
export type RollCallOptions = {
|
|
139
|
+
delay?: number;
|
|
140
|
+
namespace?: string;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export type SubscriptionOptions = {
|
|
144
|
+
namespace?: string;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
|
|
126
148
|
/**
|
|
127
149
|
* The types in this file are used to define those messages that are sent
|
|
128
150
|
* to hotmesh client instances when a new version is about to be activated.
|