@superhero/eventflow-spoke 4.8.4 → 4.8.5
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/CHANGELOG.md +6 -0
- package/config.js +4 -3
- package/index.js +3 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
package/config.js
CHANGED
|
@@ -34,9 +34,10 @@ export default
|
|
|
34
34
|
{
|
|
35
35
|
spoke:
|
|
36
36
|
{
|
|
37
|
-
NAME
|
|
38
|
-
TCP_SOCKET_CLIENT_OPTIONS
|
|
39
|
-
|
|
37
|
+
NAME : process.env.EVENTFLOW_SPOKE_NAME ?? 'EVENTFLOW-SPOKE',
|
|
38
|
+
TCP_SOCKET_CLIENT_OPTIONS : process.env.EVENTFLOW_SPOKE_TCP_SOCKET_CLIENT_OPTIONS,
|
|
39
|
+
TCP_RECORD_CHANNEL_TIMEOUT : process.env.EVENTFLOW_SPOKE_TCP_RECORD_CHANNEL_TIMEOUT ?? '10000',
|
|
40
|
+
SERDE : process.env.EVENTFLOW_SPOKE_SERDE,
|
|
40
41
|
consume:
|
|
41
42
|
{
|
|
42
43
|
// '<event_domain>' : '*',
|
package/index.js
CHANGED
|
@@ -112,7 +112,7 @@ export default class Spoke
|
|
|
112
112
|
{
|
|
113
113
|
const error = new Error('already connected to hub')
|
|
114
114
|
error.code = 'E_EVENTFLOW_SPOKE_ALREADY_CONNECTED_TO_HUB'
|
|
115
|
-
|
|
115
|
+
throw error
|
|
116
116
|
}
|
|
117
117
|
else
|
|
118
118
|
{
|
|
@@ -124,7 +124,8 @@ export default class Spoke
|
|
|
124
124
|
cert = chain.leaf.cert + chain.intermediate.cert,
|
|
125
125
|
dynamicConfig = { servername:hubID, host:hubIP, port:hubPort, ca, cert, key:chain.leaf.key, passphrase:chain.leaf.pass },
|
|
126
126
|
peerHubConfig = deepmerge(dynamicConfig, this.config.TCP_SOCKET_CLIENT_OPTIONS),
|
|
127
|
-
|
|
127
|
+
timeout = Number(this.config.TCP_RECORD_CHANNEL_TIMEOUT || 10e3),
|
|
128
|
+
hub = await this.channel.createTlsClient(peerHubConfig, socket => socket.setTimeout(timeout))
|
|
128
129
|
|
|
129
130
|
hub.id = hubID
|
|
130
131
|
this.hubs.add(hubIP, hubPort, hub)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/eventflow-spoke",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.5",
|
|
4
4
|
"description": "Eventflow spoke is the client component in the eventflow ecosystem.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eventflow",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"test": "syntax-check; node --test --test-reporter=@superhero/audit/reporter --experimental-test-coverage"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@superhero/deep": "4.8.
|
|
26
|
-
"@superhero/eventflow-certificates": "4.8.
|
|
27
|
-
"@superhero/eventflow-db": "4.8.
|
|
28
|
-
"@superhero/id-name-generator": "4.8.
|
|
29
|
-
"@superhero/log": "4.8.
|
|
30
|
-
"@superhero/tcp-record-channel": "4.8.
|
|
25
|
+
"@superhero/deep": "4.8.5",
|
|
26
|
+
"@superhero/eventflow-certificates": "4.8.5",
|
|
27
|
+
"@superhero/eventflow-db": "4.8.5",
|
|
28
|
+
"@superhero/id-name-generator": "4.8.5",
|
|
29
|
+
"@superhero/log": "4.8.5",
|
|
30
|
+
"@superhero/tcp-record-channel": "4.8.5"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@superhero/audit": "4.8.
|
|
33
|
+
"@superhero/audit": "4.8.5",
|
|
34
34
|
"@superhero/syntax-check": "0.0.2",
|
|
35
|
-
"@superhero/core": "4.8.
|
|
36
|
-
"@superhero/eventflow-hub": "4.8.
|
|
35
|
+
"@superhero/core": "4.8.5",
|
|
36
|
+
"@superhero/eventflow-hub": "4.8.5"
|
|
37
37
|
},
|
|
38
38
|
"author": {
|
|
39
39
|
"name": "Erik Landvall",
|