@hotmeshio/hotmesh 0.0.55 → 0.0.57

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.
Files changed (182) hide show
  1. package/README.md +1 -1
  2. package/build/modules/enums.js +1 -10
  3. package/build/modules/key.d.ts +0 -38
  4. package/build/modules/key.js +4 -46
  5. package/build/modules/utils.d.ts +0 -8
  6. package/build/modules/utils.js +0 -14
  7. package/build/package.json +11 -4
  8. package/build/services/activities/activity.d.ts +0 -28
  9. package/build/services/activities/activity.js +1 -46
  10. package/build/services/activities/await.js +0 -4
  11. package/build/services/activities/cycle.d.ts +0 -7
  12. package/build/services/activities/cycle.js +1 -16
  13. package/build/services/activities/hook.d.ts +0 -6
  14. package/build/services/activities/hook.js +2 -12
  15. package/build/services/activities/interrupt.js +0 -8
  16. package/build/services/activities/signal.d.ts +0 -6
  17. package/build/services/activities/signal.js +0 -15
  18. package/build/services/activities/trigger.d.ts +0 -4
  19. package/build/services/activities/trigger.js +1 -7
  20. package/build/services/activities/worker.js +0 -4
  21. package/build/services/collator/index.d.ts +0 -70
  22. package/build/services/collator/index.js +1 -91
  23. package/build/services/compiler/deployer.js +6 -38
  24. package/build/services/compiler/index.d.ts +0 -15
  25. package/build/services/compiler/index.js +0 -20
  26. package/build/services/compiler/validator.d.ts +0 -3
  27. package/build/services/compiler/validator.js +0 -25
  28. package/build/services/connector/clients/ioredis.d.ts +2 -2
  29. package/build/services/connector/clients/ioredis.js +0 -2
  30. package/build/services/connector/clients/redis.d.ts +4 -4
  31. package/build/services/connector/clients/redis.js +1 -3
  32. package/build/services/connector/index.d.ts +1 -1
  33. package/build/services/connector/index.js +0 -2
  34. package/build/services/durable/client.d.ts +1 -26
  35. package/build/services/durable/client.js +0 -56
  36. package/build/services/durable/exporter.d.ts +0 -22
  37. package/build/services/durable/exporter.js +1 -30
  38. package/build/services/durable/handle.d.ts +0 -36
  39. package/build/services/durable/handle.js +0 -46
  40. package/build/services/durable/index.d.ts +0 -4
  41. package/build/services/durable/index.js +0 -4
  42. package/build/services/durable/schemas/factory.d.ts +0 -29
  43. package/build/services/durable/schemas/factory.js +0 -29
  44. package/build/services/durable/search.d.ts +1 -36
  45. package/build/services/durable/search.js +56 -56
  46. package/build/services/durable/worker.js +2 -22
  47. package/build/services/durable/workflow.d.ts +0 -114
  48. package/build/services/durable/workflow.js +1 -141
  49. package/build/services/engine/index.d.ts +1 -6
  50. package/build/services/engine/index.js +1 -43
  51. package/build/services/exporter/index.d.ts +0 -27
  52. package/build/services/exporter/index.js +0 -33
  53. package/build/services/hotmesh/index.d.ts +2 -2
  54. package/build/services/hotmesh/index.js +1 -9
  55. package/build/services/logger/index.js +0 -2
  56. package/build/services/mapper/index.d.ts +0 -14
  57. package/build/services/mapper/index.js +0 -14
  58. package/build/services/pipe/functions/date.d.ts +0 -7
  59. package/build/services/pipe/functions/date.js +0 -7
  60. package/build/services/pipe/functions/math.js +0 -2
  61. package/build/services/pipe/index.d.ts +0 -15
  62. package/build/services/pipe/index.js +2 -23
  63. package/build/services/quorum/index.d.ts +0 -7
  64. package/build/services/quorum/index.js +0 -21
  65. package/build/services/reporter/index.d.ts +0 -5
  66. package/build/services/reporter/index.js +0 -9
  67. package/build/services/router/index.d.ts +0 -9
  68. package/build/services/router/index.js +2 -38
  69. package/build/services/serializer/index.js +7 -26
  70. package/build/services/store/cache.d.ts +0 -18
  71. package/build/services/store/cache.js +0 -18
  72. package/build/services/store/clients/ioredis.d.ts +1 -1
  73. package/build/services/store/clients/ioredis.js +0 -1
  74. package/build/services/store/clients/redis.d.ts +1 -1
  75. package/build/services/store/index.d.ts +0 -55
  76. package/build/services/store/index.js +5 -81
  77. package/build/services/stream/clients/ioredis.d.ts +1 -1
  78. package/build/services/stream/clients/ioredis.js +1 -4
  79. package/build/services/stream/clients/redis.d.ts +1 -1
  80. package/build/services/sub/clients/ioredis.d.ts +1 -1
  81. package/build/services/sub/clients/redis.d.ts +1 -1
  82. package/build/services/task/index.d.ts +0 -9
  83. package/build/services/task/index.js +0 -31
  84. package/build/services/telemetry/index.d.ts +0 -7
  85. package/build/services/telemetry/index.js +1 -13
  86. package/build/services/worker/index.d.ts +0 -4
  87. package/build/services/worker/index.js +2 -6
  88. package/build/types/activity.d.ts +0 -81
  89. package/build/types/durable.d.ts +26 -177
  90. package/build/types/exporter.d.ts +0 -13
  91. package/build/types/hotmesh.d.ts +4 -16
  92. package/build/types/hotmesh.js +0 -3
  93. package/build/types/index.d.ts +4 -6
  94. package/build/types/index.js +4 -3
  95. package/build/types/job.d.ts +1 -86
  96. package/build/types/pipe.d.ts +0 -65
  97. package/build/types/quorum.d.ts +15 -10
  98. package/build/types/redis.d.ts +225 -7
  99. package/build/types/redis.js +9 -0
  100. package/build/types/stream.d.ts +0 -58
  101. package/build/types/stream.js +0 -4
  102. package/package.json +11 -4
  103. package/types/durable.ts +131 -4
  104. package/types/hotmesh.ts +3 -6
  105. package/types/index.ts +23 -10
  106. package/types/job.ts +1 -1
  107. package/types/quorum.ts +22 -0
  108. package/types/redis.ts +267 -18
  109. package/build/types/ioredisclient.d.ts +0 -5
  110. package/build/types/ioredisclient.js +0 -5
  111. package/build/types/redisclient.d.ts +0 -26
  112. package/build/types/redisclient.js +0 -2
  113. package/modules/enums.ts +0 -62
  114. package/modules/errors.ts +0 -280
  115. package/modules/key.ts +0 -101
  116. package/modules/storage.ts +0 -3
  117. package/modules/utils.ts +0 -242
  118. package/services/activities/activity.ts +0 -589
  119. package/services/activities/await.ts +0 -113
  120. package/services/activities/cycle.ts +0 -115
  121. package/services/activities/hook.ts +0 -197
  122. package/services/activities/index.ts +0 -19
  123. package/services/activities/interrupt.ts +0 -172
  124. package/services/activities/signal.ts +0 -148
  125. package/services/activities/trigger.ts +0 -295
  126. package/services/activities/worker.ts +0 -107
  127. package/services/collator/README.md +0 -102
  128. package/services/collator/index.ts +0 -291
  129. package/services/compiler/deployer.ts +0 -504
  130. package/services/compiler/index.ts +0 -98
  131. package/services/compiler/validator.ts +0 -158
  132. package/services/connector/clients/ioredis.ts +0 -57
  133. package/services/connector/clients/redis.ts +0 -72
  134. package/services/connector/index.ts +0 -42
  135. package/services/durable/client.ts +0 -266
  136. package/services/durable/connection.ts +0 -10
  137. package/services/durable/exporter.ts +0 -232
  138. package/services/durable/handle.ts +0 -160
  139. package/services/durable/index.ts +0 -27
  140. package/services/durable/schemas/factory.ts +0 -2358
  141. package/services/durable/search.ts +0 -196
  142. package/services/durable/worker.ts +0 -401
  143. package/services/durable/workflow.ts +0 -557
  144. package/services/engine/index.ts +0 -761
  145. package/services/exporter/index.ts +0 -146
  146. package/services/hotmesh/index.ts +0 -237
  147. package/services/logger/index.ts +0 -79
  148. package/services/mapper/index.ts +0 -89
  149. package/services/pipe/functions/array.ts +0 -78
  150. package/services/pipe/functions/bitwise.ts +0 -27
  151. package/services/pipe/functions/conditional.ts +0 -35
  152. package/services/pipe/functions/date.ts +0 -220
  153. package/services/pipe/functions/index.ts +0 -27
  154. package/services/pipe/functions/json.ts +0 -11
  155. package/services/pipe/functions/logical.ts +0 -11
  156. package/services/pipe/functions/math.ts +0 -217
  157. package/services/pipe/functions/number.ts +0 -75
  158. package/services/pipe/functions/object.ts +0 -98
  159. package/services/pipe/functions/string.ts +0 -86
  160. package/services/pipe/functions/symbol.ts +0 -39
  161. package/services/pipe/functions/unary.ts +0 -19
  162. package/services/pipe/index.ts +0 -216
  163. package/services/quorum/index.ts +0 -319
  164. package/services/reporter/index.ts +0 -387
  165. package/services/router/index.ts +0 -426
  166. package/services/serializer/README.md +0 -10
  167. package/services/serializer/index.ts +0 -285
  168. package/services/store/cache.ts +0 -172
  169. package/services/store/clients/ioredis.ts +0 -145
  170. package/services/store/clients/redis.ts +0 -191
  171. package/services/store/index.ts +0 -1091
  172. package/services/stream/clients/ioredis.ts +0 -157
  173. package/services/stream/clients/redis.ts +0 -158
  174. package/services/stream/index.ts +0 -58
  175. package/services/sub/clients/ioredis.ts +0 -83
  176. package/services/sub/clients/redis.ts +0 -74
  177. package/services/sub/index.ts +0 -25
  178. package/services/task/index.ts +0 -250
  179. package/services/telemetry/index.ts +0 -273
  180. package/services/worker/index.ts +0 -248
  181. package/types/ioredisclient.ts +0 -10
  182. package/types/redisclient.ts +0 -30
@@ -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.55",
3
+ "version": "0.0.57",
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
- "hotmesh",
68
+ "HotMesh",
69
69
  "service mesh",
70
70
  "workflows",
71
71
  "operational data",
72
- "redis"
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.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
 
@@ -117,15 +118,121 @@ type WorkflowSearchOptions = {
117
118
  prefix?: string[];
118
119
 
119
120
  /**
120
- * Schema mapping each field to a type with an optional sortable flag
121
+ * Schema mapping each field. Each field is a key-value pair where the key is the field name
122
+ * and the value is a record of field options. If the fieldName is provided,
123
+ * it will be used as the indexed field name. If not provided
124
+ * key will be used as the indexed field name with an underscore prefix.
125
+ *
121
126
  */
122
- schema?: Record<string, { type: 'TEXT' | 'NUMERIC' | 'TAG', sortable?: boolean }>;
127
+ schema?: Record<string, {
128
+ /**
129
+ * The FT.SEARCH field type. One of: TEXT, NUMERIC, TAG. TEXT is
130
+ * most expensive, but also most expressive.
131
+ */
132
+ type: 'TEXT' | 'NUMERIC' | 'TAG';
133
+
134
+ /**
135
+ * FT.SEARCH SORTABLE field. If true, results may be sorted according to this field
136
+ * @default false
137
+ */
138
+ sortable?: boolean;
139
+
140
+ /**
141
+ * FT.SEARCH NOSTEM field. applies to TEXT fields types.
142
+ * If true, the text field index will not stem words
143
+ * @default false
144
+ */
145
+ nostem?: boolean;
146
+
147
+ /**
148
+ * FT.SEARCH NOINDEX field. If true and if the field is sortable, the field will aid
149
+ * in sorting results but not be directly indexed as a standalone
150
+ * @default false
151
+ */
152
+ noindex?: boolean;
153
+
154
+ /**
155
+ * if true, the field is indexed and searchable within the FT.SEARCH index
156
+ * This is different from `noindex` which is FT.SEARCH specific and relates
157
+ * to sorting and indexing. This is a general flag for the field that will
158
+ * enable or disable indexing and searching entirely. Use for fields with
159
+ * absolutely no meaning to query or sorting but which are important
160
+ * nonetheless as part of the data record that is saved and returned.
161
+ * @default true
162
+ */
163
+ indexed?: boolean;
164
+
165
+ /**
166
+ * An array of possible values for the field
167
+ */
168
+ examples?: string[];
169
+
170
+ /**
171
+ * The 'nilable' setting may NOT be set to `true` for
172
+ * NUMBER types as it causes an indexing error;
173
+ * consider a custom (e.g., negative number) value to represent
174
+ * `null` if desired for a NUMERIC field.
175
+ * Set to true only if the field is a TEXT or TAG type and
176
+ * you wish to save the string `null` as a value to search
177
+ * on (the tag, {null}, or the string, (null)
178
+ * @default false
179
+ */
180
+ nilable?: boolean;
181
+
182
+ /**
183
+ * possible scalar/primitive types for the field. Use when
184
+ * serializing and restoring data to ensure the field is
185
+ * properly typed. If not provided, the field will be
186
+ * treated as a string.
187
+ */
188
+ primitive?: 'string' | 'number' | 'boolean' | 'array' | 'object';
189
+
190
+ /**
191
+ * if true, the field is required to be present in the data record
192
+ * @default false
193
+ */
194
+ required?: boolean;
195
+
196
+ /**
197
+ * an enumerated list of allowed values; if field is nilable, it is implied
198
+ * and therefore not necessary to include `null` in the list
199
+ * @default []
200
+ */
201
+ enum?: string[];
202
+
203
+ /**
204
+ * a regular expression pattern for the field
205
+ * @default '.*'
206
+ * @example '^[a-zA-Z0-9_]*$'
207
+ */
208
+ pattern?: string;
209
+
210
+ /**
211
+ * literal value to use for the indexed field name (without including the standard underscore (_) prefix isolate)
212
+ */
213
+ fieldName?: string;
214
+ }>;
123
215
 
124
216
  /** Additional data as a key-value record */
125
217
  data?: StringStringType;
126
218
  }
127
219
 
128
220
 
221
+ type SearchResults = {
222
+ /**
223
+ * the total number of results
224
+ */
225
+ count: number,
226
+ /**
227
+ * the raw FT.SEARCH query string
228
+ */
229
+ query: string,
230
+ /**
231
+ * the raw FT.SEARCH results as an array of objects
232
+ */
233
+ data: StringStringType[]
234
+ };
235
+
129
236
  type WorkflowOptions = {
130
237
 
131
238
  /**
@@ -280,8 +387,8 @@ type WorkflowDataType = {
280
387
  }
281
388
 
282
389
  type ConnectionConfig = {
283
- class: RedisClass;
284
- options: RedisOptions;
390
+ class: Partial<RedisClass>;
391
+ options: Partial<RedisOptions>;
285
392
  }
286
393
  type Connection = ConnectionConfig;
287
394
 
@@ -328,6 +435,7 @@ type FindOptions = {
328
435
  taskQueue?: string;
329
436
  namespace?: string;
330
437
  index?: string;
438
+ search?: WorkflowSearchOptions;
331
439
  }
332
440
 
333
441
  type FindWhereOptions = {
@@ -341,6 +449,23 @@ type FindWhereOptions = {
341
449
  }
342
450
  }
343
451
 
452
+ type FindJobsOptions = {
453
+ /** The workflow name; include an asterisk for wilcard search; refer to Redis SCAN for the allowed format */
454
+ match?: string;
455
+
456
+ /** application namespace; defaults to 'durable' */
457
+ namespace?: string;
458
+
459
+ /** The suggested response limit. Reduce batch size to reduce the likelihood of large overages. */
460
+ limit?: number;
461
+
462
+ /** How many records to scan at a time */
463
+ batch?: number;
464
+
465
+ /** The start cursor; defaults to 0 */
466
+ cursor?: string;
467
+ }
468
+
344
469
  type WorkerOptions = {
345
470
  /** Log level: debug, info, warn, error */
346
471
  logLevel?: LogLevel;
@@ -422,10 +547,12 @@ export {
422
547
  ProxyType,
423
548
  Registry,
424
549
  SignalOptions,
550
+ FindJobsOptions,
425
551
  FindOptions,
426
552
  FindWhereOptions,
427
553
  FindWhereQuery,
428
554
  HookOptions,
555
+ SearchResults,
429
556
  WorkerConfig,
430
557
  WorkflowConfig,
431
558
  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
- MultiResponseFlags,
135
+ RedisClass,
136
+ RedisRedisClientType,
137
+ RedisRedisClientOptions,
138
+ RedisRedisClassType,
139
+ IORedisClientType,
133
140
  RedisClient,
134
- RedisMulti } from './redis'; //common redis types
135
- export {
136
- RedisClientType,
137
- RedisMultiType } from './redisclient';
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
@@ -201,9 +201,9 @@ type JobCompletionOptions = {
201
201
 
202
202
  export {
203
203
  JobCompletionOptions,
204
- JobInterruptOptions,
205
204
  JobData,
206
205
  JobsData,
206
+ JobInterruptOptions,
207
207
  JobMetadata,
208
208
  JobOutput,
209
209
  JobState,
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.