@superhero/eventflow-hub 4.0.11 → 4.0.13
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/config.js +1 -0
- package/index.js +6 -3
- package/package.json +2 -2
package/config.js
CHANGED
|
@@ -19,6 +19,7 @@ export default
|
|
|
19
19
|
EXTERNAL_PORT : process.env.EVENTFLOW_HUB_EXTERNAL_PORT ?? 50001,
|
|
20
20
|
TCP_SOCKET_SERVER_OPTIONS : process.env.EVENTFLOW_HUB_TCP_SOCKET_SERVER_OPTIONS ?? {},
|
|
21
21
|
TCP_SOCKET_CLIENT_OPTIONS : process.env.EVENTFLOW_HUB_TCP_SOCKET_CLIENT_OPTIONS ?? {},
|
|
22
|
+
PEER_HUB_ONLINE_TIMEOUT : process.env.EVENTFLOW_HUB_PEER_HUB_ONLINE_TIMEOUT ?? 5e3,
|
|
22
23
|
KEEP_ALIVE_INTERVAL : process.env.EVENTFLOW_HUB_KEEP_ALIVE_INTERVAL ?? 60e3,
|
|
23
24
|
SHEDULED_INTERVAL_DELAY : process.env.EVENTFLOW_HUB_SHEDULED_INTERVAL_DELAY ?? 1e3,
|
|
24
25
|
|
package/index.js
CHANGED
|
@@ -342,15 +342,18 @@ export default class Hub
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
async #transmitHubOnlineToPeerHub(
|
|
345
|
+
async #transmitHubOnlineToPeerHub(servername, host, port)
|
|
346
346
|
{
|
|
347
347
|
const
|
|
348
348
|
rootCA = await this.certificates.root,
|
|
349
349
|
hubICA = await this.certificates.intermediate,
|
|
350
350
|
hubLeaf = await this.certificates.leaf,
|
|
351
351
|
ca = rootCA.cert,
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
cert = hubLeaf.cert + hubICA.cert,
|
|
353
|
+
key = hubLeaf.key,
|
|
354
|
+
passphrase = hubLeaf.pass,
|
|
355
|
+
timeout = Number(this.config.PEER_HUB_ONLINE_TIMEOUT),
|
|
356
|
+
dynamicConfig = { servername, host, port, ca, cert, key, passphrase, timeout },
|
|
354
357
|
peerHubConfig = deepmerge(dynamicConfig, this.config.TCP_SOCKET_CLIENT_OPTIONS),
|
|
355
358
|
peerHub = await this.channel.createTlsClient(peerHubConfig)
|
|
356
359
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/eventflow-hub",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.13",
|
|
4
4
|
"description": "Eventflow hub is the central server component in the eventflow ecosystem.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eventflow",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@superhero/log": "^4.0.1",
|
|
19
19
|
"@superhero/eventflow-certificates": "^4.0.7",
|
|
20
20
|
"@superhero/eventflow-db": "^4.2.3",
|
|
21
|
-
"@superhero/tcp-record-channel": "^4.2.
|
|
21
|
+
"@superhero/tcp-record-channel": "^4.2.2",
|
|
22
22
|
"@superhero/deep": "^4.2.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|