fix docker-compose files to work with 21.10
fixes to match TCP protocol of 21.10 fixes so that we can gossip on SSL
This commit is contained in:
parent
aa07b04dd3
commit
5059892bc0
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -34,6 +34,7 @@ node_modules
|
||||||
|
|
||||||
# InteliJ
|
# InteliJ
|
||||||
.idea/workspace.xml
|
.idea/workspace.xml
|
||||||
|
.idea/shelf
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
lib/
|
lib/
|
||||||
|
|
12
README.md
12
README.md
|
@ -24,14 +24,22 @@ If you want to learn more about EventSourcing/EventModeling, you can join one of
|
||||||
|
|
||||||
Install using `npm install node-eventstore-client`
|
Install using `npm install node-eventstore-client`
|
||||||
|
|
||||||
|
Versions to install to match EventStore versions:
|
||||||
|
|
||||||
|
- 0.1.x for ES prior to 3.9.4
|
||||||
|
- 0.2.x for ES from 3.9.4 to 20.10
|
||||||
|
- 21.10.x for ES 21.10
|
||||||
|
|
||||||
|
*I am working on making version match LTS and latest release of EventStore so that TCP protocol matches*
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
- Node.js >= 4.0
|
- Node.js >= 12
|
||||||
- Modules: [long](https://www.npmjs.org/package/long), [protobufjs](https://www.npmjs.org/package/protobufjs), [uuid](https://www.npmjs.org/package/uuid), [strict-event-emitter-types](https://www.npmjs.com/package/strict-event-emitter-types) (installed via `npm install`)
|
- Modules: [long](https://www.npmjs.org/package/long), [protobufjs](https://www.npmjs.org/package/protobufjs), [uuid](https://www.npmjs.org/package/uuid), [strict-event-emitter-types](https://www.npmjs.com/package/strict-event-emitter-types) (installed via `npm install`)
|
||||||
|
|
||||||
### Install and run an Eventstore on localhost
|
### Install and run an Eventstore on localhost
|
||||||
|
|
||||||
See https://eventstore.org/docs/introduction/4.1.0/
|
See https://eventstore.com
|
||||||
|
|
||||||
*Note: If you are using a version of EventStore prior to 3.9.4, you need to use version 0.1.x of this package `npm install node-eventstore-client@^0.1`.*
|
*Note: If you are using a version of EventStore prior to 3.9.4, you need to use version 0.1.x of this package `npm install node-eventstore-client@^0.1`.*
|
||||||
|
|
||||||
|
|
23
certs/ca/ca.crt
Normal file
23
certs/ca/ca.crt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDzTCCArWgAwIBAgIRAJD0c8z8ITssbEkzjx4ZmRowDQYJKoZIhvcNAQELBQAw
|
||||||
|
YjELMAkGA1UEBhMCVUsxGDAWBgNVBAoTD0V2ZW50IFN0b3JlIEx0ZDE5MDcGA1UE
|
||||||
|
AxMwRXZlbnRTdG9yZURCIENBIDkwZjQ3M2NjZmMyMTNiMmM2YzQ5MzM4ZjFlMTk5
|
||||||
|
OTFhMB4XDTIyMTAyMjEzNTA1N1oXDTI3MTAyMjEzNTA1N1owYjELMAkGA1UEBhMC
|
||||||
|
VUsxGDAWBgNVBAoTD0V2ZW50IFN0b3JlIEx0ZDE5MDcGA1UEAxMwRXZlbnRTdG9y
|
||||||
|
ZURCIENBIDkwZjQ3M2NjZmMyMTNiMmM2YzQ5MzM4ZjFlMTk5OTFhMIIBIjANBgkq
|
||||||
|
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA17JM4jAG4fM4dtA6mpatLVkYhS42wwHC
|
||||||
|
RbG7dQINSE9wMKpoy2u4sDvZQrsudOvdeclPkIL1JgUtk7lDlqRMXZ6HnP7zTCKn
|
||||||
|
SQCXzvc3IIU0cGlkffuIS/kuAGBePvmmTwFE3ByDneydlHpSUGEvQY1KEAKwpgSO
|
||||||
|
LX1NtthP3kKT+bq0NdQlgOjm9dEkSYWwfCM7Of9cJdh8bCO4zJ1taGqchxluWlpo
|
||||||
|
DJL6TTHsZDvDjhfzBxhjuRax4S8B8xLaq6LirTFEFGpqFBhqzGGhRl42ZylKqVo9
|
||||||
|
fKhhywwq81ItROmB14OGKa8gyJi7pWGSKRI4M6Ngn89D50Q49K1QdQIDAQABo34w
|
||||||
|
fDAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBAjApBgNVHQ4EIgQg
|
||||||
|
/3vmZ5JvcSlcqyaNXgrQZ5FOXlZ9HvYr9x+Tbrs3Mx4wKwYDVR0jBCQwIoAg/3vm
|
||||||
|
Z5JvcSlcqyaNXgrQZ5FOXlZ9HvYr9x+Tbrs3Mx4wDQYJKoZIhvcNAQELBQADggEB
|
||||||
|
AIMQR/3BHnVYAuG6DSdDPVYkPR9Fvwi9G9U1nybMHY9uSnEOp6yASrRc/cD7pIbP
|
||||||
|
Ax7cvD5f0829fAUFupXtp2T/yNOA7/eis7l6Y0ZZf+QEk9XhZXHVTFLFDb9Fyc6r
|
||||||
|
+i/lXnatGsYwOns0RFSG6tzxi2lxUPwlXauacwTBW4jrphtn0vC3q/n85JOEi2ib
|
||||||
|
aIlXaXUTREJFiFnS22/SX4dSRaeimL34rrd9AjX53Ne6pUiVBGgd2aSUkBh65EYk
|
||||||
|
VCIZwuWLx0jgcT8NI/EeId7FN4CWq73dze5eY2QU00rXidyYDeC2aZcU5e2RTQqn
|
||||||
|
5dGqFGAd/xCopGYdWfusqKM=
|
||||||
|
-----END CERTIFICATE-----
|
27
certs/ca/ca.key
Normal file
27
certs/ca/ca.key
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpQIBAAKCAQEA17JM4jAG4fM4dtA6mpatLVkYhS42wwHCRbG7dQINSE9wMKpo
|
||||||
|
y2u4sDvZQrsudOvdeclPkIL1JgUtk7lDlqRMXZ6HnP7zTCKnSQCXzvc3IIU0cGlk
|
||||||
|
ffuIS/kuAGBePvmmTwFE3ByDneydlHpSUGEvQY1KEAKwpgSOLX1NtthP3kKT+bq0
|
||||||
|
NdQlgOjm9dEkSYWwfCM7Of9cJdh8bCO4zJ1taGqchxluWlpoDJL6TTHsZDvDjhfz
|
||||||
|
BxhjuRax4S8B8xLaq6LirTFEFGpqFBhqzGGhRl42ZylKqV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2Zo1JJhfiyL+ghW/nAWOjOmzneBLzlEG
|
||||||
|
QSSJXNZd4tEQynRINqfZyBRx1vEsdJ/eKsfkTsGQCp4AneoxV+pvPGkhS3G5x1up
|
||||||
|
NU7uAHHBstcMMfLbY0dEFywN97GxvJGgTWA1yquCGia6s3SBOwjAyXWEBNfaqH+o
|
||||||
|
ybgf8ekCgYEA3/Vx/CZ/VB0Fr47cpZGckJWH6lDWkzBEcaAT22VYlhL4CZ0CRDWj
|
||||||
|
6+LSiQDuI3+JwEhZlIkTvfZSo5bhNeUHoEL+15yg2RvsWFzorDxBfvZ//29BQg/Q
|
||||||
|
bN+vlKHpn7V7T9LQg/Tp107mfW6Z/TG4UYIVJyxY/JUjXjQLcFPvTVE=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
23
certs/node1/node1.crt
Normal file
23
certs/node1/node1.crt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIID0zCCArugAwIBAgIRAICyIvDoMRsOp8HOeD9x6k0wDQYJKoZIhvcNAQELBQAw
|
||||||
|
YjELMAkGA1UEBhMCVUsxGDAWBgNVBAoTD0V2ZW50IFN0b3JlIEx0ZDE5MDcGA1UE
|
||||||
|
AxMwRXZlbnRTdG9yZURCIENBIDkwZjQ3M2NjZmMyMTNiMmM2YzQ5MzM4ZjFlMTk5
|
||||||
|
OTFhMB4XDTIyMTAyMjEzNTIwMloXDTIzMTAyMjEzNTIwMlowHDEaMBgGA1UEAxMR
|
||||||
|
ZXZlbnRzdG9yZWRiLW5vZGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
|
||||||
|
AQC5EvroAGtYYso6BHH1Ik9IeTV7fQZfpKqolGKtDyw8UBdJiss5OfQYB35I0lbw
|
||||||
|
QOYU5oC4kto1ku4Y+kEuv/4RHPNEykurjYtGAcBRMT8JB96dW6rrKtGkISJlmtfa
|
||||||
|
0OoAcPySKHnjrgsT3FYpvD5Sm8aP7YuZlaZbUIyg66h0Nd932bAZN8i7UoiAKxse
|
||||||
|
3m1a/rJvHCcMma9tJwuzfc7GU8yyRhl9a9doUtwh0uGU7sfiXR0yQB7xYKroXl3R
|
||||||
|
YBvqoteZ3beTSBM5mAxfRKK3JS3NlK4ys4DXp2YVWTUkoEv9oDqLr7DJSnPA1ZQk
|
||||||
|
MwZGByQohPDF6vz9ok2rX6W3AgMBAAGjgckwgcYwDgYDVR0PAQH/BAQDAgWgMB0G
|
||||||
|
A1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMCkGA1Ud
|
||||||
|
DgQiBCBAtQuI/026tsHlRnIi4NJRD6gZWAb/lf7D2zow/ACgkjArBgNVHSMEJDAi
|
||||||
|
gCD/e+Znkm9xKVyrJo1eCtBnkU5eVn0e9iv3H5NuuzczHjAvBgNVHREEKDAmgiQq
|
||||||
|
LnRlc3RzLm5vZGUtZXZlbnRzdG9yZS1jbGllbnQubG9jYWwwDQYJKoZIhvcNAQEL
|
||||||
|
BQADggEBAMDQE0GqALLeMixp7ZbKepN+BvqLvQYF22U0wr+rBdo4UvEKTAtZ1Jku
|
||||||
|
vwhPy6fmlq8vwf9YGrwJHwQHRIbg/H0gFV3M+Xk4LNg7anptBQ+K0Q1tSo997uoS
|
||||||
|
jNKZTD9szy2dLfJK3xaJT5tU2qcTxPFr7/ztDhc1qXX094rqcVJc6GIQXZdvh9FD
|
||||||
|
kNjRpCVnHNWX8CWRYdod+Lq9IUDwTsWi8BVPIxJUB2qbiK40tX77+NGV6MFmhGFE
|
||||||
|
aLdso5mwegpqOQXM8m/JRDrJNVAZAbDT4Myy1+UcDu/91jw/xuPmCLZMXEbsFIGu
|
||||||
|
IKF8Kr6IXObMJpr7M8t/vb1eb6BQufk=
|
||||||
|
-----END CERTIFICATE-----
|
27
certs/node1/node1.key
Normal file
27
certs/node1/node1.key
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
-----BEGIN RSA PRIVATE KEY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OZ3vJkYvIfF3axdCW/sxoR/dxTQuSzuVnB1v
|
||||||
|
eLKgQ9o1aoU44GTWMdO72pHYzwtb2M+Y0jD5ZDDUBcTVy7uG++ATLyzr9irFZMOy
|
||||||
|
Wn9+7nUFdAEzDYBfnL0sxXc3ltt55onmC7yrdV0CgYEAqcZP3+7b8/cjZ7G9Y0wB
|
||||||
|
xJtTdBquN9umUe96slOx6a2Fe2vdAw+W4m8uxKg/KfAJY75zMgqTEpzxrwRhzBcK
|
||||||
|
kruo1EpKHrT4jcRTvQTjGX2btnHnMXSlDN3TdaU/mXwY8mpqOZbp59QhxyJyrLJu
|
||||||
|
F46n8Z+EOkAlSSAVxCoi9JMCgYEAtgundzZiTUyGJ7jwaRgGqRzeQaZ/NQqU2GQ2
|
||||||
|
eYL4H4ZrSyQV3LfMlRjW0jqw7Hx2cgBvB4mIVLK8cga6DSU93o6JTUTI7QSwRGAL
|
||||||
|
Pea52YQx5JdOLqtIUkJK/wiWVCRcQMzDI/2U5YjvGPtdMmQt+bmz4kg78swBi4Zg
|
||||||
|
vZqGKxUCgYBdBMRd4nxwAk9aphiCB0/OS/WSfc0CqegcwFG9ireb8iD9xvayqsNt
|
||||||
|
s4NI6cncnZXOTKm2mEd3E4yo8N9LieyNZV6kIhKxDMfgrRxLMBC17ur8R5z3uNzl
|
||||||
|
F69As0W69+VqyoM/pS9hDJ72DiA4YblWkWiZuZzhqi0Jwh9VEY2Oew==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
23
certs/node2/node2.crt
Normal file
23
certs/node2/node2.crt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIID0jCCArqgAwIBAgIQb+tOqV1PR8uW4adXZE8bMjANBgkqhkiG9w0BAQsFADBi
|
||||||
|
MQswCQYDVQQGEwJVSzEYMBYGA1UEChMPRXZlbnQgU3RvcmUgTHRkMTkwNwYDVQQD
|
||||||
|
EzBFdmVudFN0b3JlREIgQ0EgOTBmN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i3EEve48CLOZ8YqoZ5UPUF51SMlr/aXbZehHA8xOeVPL8ImtUZ94y7SgeP8
|
||||||
|
VQFvGYQV6ysBahR/x/D6OHhIcl22RrRD44zz/t/5qgFNCwiR4l7Kd33gX3SJtFA1
|
||||||
|
x3KCKSQl5j2j0ME9J0ro9QsJxhhAHk/YIW1+VfO4Q6TBmopscXea6uNq5wQBeIcQ
|
||||||
|
8M4M9MYa3Xy4FUquonpnSYiYtLEdvQ==
|
||||||
|
-----END CERTIFICATE-----
|
27
certs/node2/node2.key
Normal file
27
certs/node2/node2.key
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpQIBAAKCAQEA0Iek7splAud6UIRrZBbXYSSjf3DfIIN2rXYIg25FUjFn2ENp
|
||||||
|
djRBeDYSOwqCdZ5Y1uEZPmTANFltH38QXA/ROy6NwuYXsl2Inih6td2uqnu5NlZm
|
||||||
|
rvQEOqEpmj8+cUFz84cnDBl2EN3bhvoh3XcwBrckzgjlttzmjiOvDDGqKZdpHQjD
|
||||||
|
sPshyFD9BF43+NEkCtkiSMfD8zmWNfwt1IylPYBzLx/eFx9SNrQ4aCNY07LfsMsN
|
||||||
|
fQYkLPBBrQ292IY9/BGfLs9ATJpERHa8+G6opvX7z4LitIESLEFQebSs8iYIIvxA
|
||||||
|
CRB1/Mct4IBu17PP79u/OqPOZE1An8DyKxKCYQIDAQABAoIBAQDPsjrxZ/9B7EJk
|
||||||
|
je/UqfdtlyuNlGN4o9gBny2NkrhSzEitGz+gbx3CWMDBs48LDWNY6qzU+06BFYzd
|
||||||
|
sRYfS9XPB2hE9h4mFokrVhAasij1PvPTji0KFptbtgeUzWcpMNMHfNbEc1uoIwEz
|
||||||
|
KFGwnrTkC2gKGsyJ3O16J0qDb7gXYR4Ws566NGJDbjz14p7CTIoXhp3K/hvrowEx
|
||||||
|
UHjnFsaSrcbWZ+CHT9fKkQFYUqh0ab0dFo9L293ikRxs+rsvc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O4AS1XJlNBY3Q28bZcAhOZq5KUHj1Y=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
23
certs/node3/node3.crt
Normal file
23
certs/node3/node3.crt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIID0zCCArugAwIBAgIRAIrgk9b8CiaOIhKw0UVCnw0wDQYJKoZIhvcNAQELBQAw
|
||||||
|
YjELMAkGA1UEBhMCVUsxGDAWBgNVBAoTD0V2ZW50IFN0b3JlIEx0ZDE5MDcGA1UE
|
||||||
|
AxMwRXZlbnRTdG9yZURCIENBIDkwZjQ3M2NjZmMyMTNiMmM2YzQ5MzM4ZjFlMTk5
|
||||||
|
OTFhMB4XDTIyMTAyMjEzNTIwM1oXDTIzMTAyMjEzNTIwM1owHDEaMBgGA1UEAxMR
|
||||||
|
ZXZlbnRzdG9yZWRiLW5vZGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
|
||||||
|
AQDmS3u8Mx1OUbXqFlDSU25sthiBI8p5sUq5/VvuKVEAvBuSQydTwbCU3cfaUNCk
|
||||||
|
wLkIEVJInqtzsUnUWkPRDg3W4bFzEoXzP1/1OffqcgjwDl+hym/k0HWGvt4UzXnw
|
||||||
|
7MXHxlMUj6E+GK9JvleKIo9C/zWg7o7ZaC4s/cYkkkmHHzHVCcapuKCJEbUKJgzt
|
||||||
|
JnJ8wZCPvmEHWoTT7255drMMh1cwzZvOqCWpZ0Qk1+KZc6C7QcbGrnPv1PIKT53o
|
||||||
|
7XDZnAXTGfbah0/e5zIM4/Ms3JauObbcXv/oSb8KeiMrYmM12CfAJ9LAu7sm8uOz
|
||||||
|
tuVvpaT9lH0v91Aat1G4k19/AgMBAAGjgckwgcYwDgYDVR0PAQH/BAQDAgWgMB0G
|
||||||
|
A1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMCkGA1Ud
|
||||||
|
DgQiBCCla0cvcjb+WYGvsdw50JZcKNTFFj4je4cHn8xci9SQqTArBgNVHSMEJDAi
|
||||||
|
gCD/e+Znkm9xKVyrJo1eCtBnkU5eVn0e9iv3H5NuuzczHjAvBgNVHREEKDAmgiQq
|
||||||
|
LnRlc3RzLm5vZGUtZXZlbnRzdG9yZS1jbGllbnQubG9jYWwwDQYJKoZIhvcNAQEL
|
||||||
|
BQADggEBAJtCYINTvOQXOYIhEUZLjyPKqAKc5Ey117WNj1BJ1OAlrddwiMGUZg1L
|
||||||
|
g3Md2oKJXrsKrNBgePEnfa/gCt1kBUpNfO5ILVJtVzuifQAsePtbjvkRA5suzll3
|
||||||
|
FP1QrvC8ZCq9oDW9+/WEGEi2Bjp2RPKlRBKj1wP/4MYKwjoGY2ezrb/rutKVpdIm
|
||||||
|
3UEoaJG1VpT7IkdcIcLSCyPS5BDd/Jf1428ZZuq6DlbSOIRjCo8w9hazfizeJ+iE
|
||||||
|
kGDygYYg5RkPsl8ACcXsZDCPr6gS2yFa1v0eQOV3CPeO8i6aiQToZekEoAVGrJ9/
|
||||||
|
HpLfDap2pVqf8gSnX59XIsE/WwMVWjc=
|
||||||
|
-----END CERTIFICATE-----
|
27
certs/node3/node3.key
Normal file
27
certs/node3/node3.key
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpAIBAAKCAQEA5kt7vDMdTlG16hZQ0lNubLYYgSPKebFKuf1b7ilRALwbkkMn
|
||||||
|
U8GwlN3H2lDQpMC5CBFSSJ6rc7FJ1FpD0Q4N1uGxcxKF8z9f9Tn36nII8A5focpv
|
||||||
|
5NB1hr7eFM158OzFx8ZTFI+hPhivSb5XiiKPQv81oO6O2WguLP3GJJJJhx8x1QnG
|
||||||
|
qbigiRG1CiYM7SZyfMGQj75hB1qE0+9ueXazDIdXMM2bzqglqWdEJNfimXOgu0HG
|
||||||
|
xq5z79TyCk+d6O1w2ZwF0xn22odP3ucyDOPzLNyWrjm23F7/6Em/C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4Fl2CbhG2u1H/SeQYljEMt/MMWT4NTcTOJe
|
||||||
|
4g9732JWdMRTaNKMhNZ8l4OmY0UsflqZQ3LkaCnlelsRYdHDp7XcIXas0z8SsZiL
|
||||||
|
LFMfT3rsN5PV9ik+07q1M2A9WciasFthLp41cxNjEnoxIXwMteUCKQ3LIef7ROZK
|
||||||
|
sBA7SQKBgQDBxdbUQCpwLs9iJQH+ddPhIGKXLGNw/3f4quKBGz6fO1X4E9STFWoa
|
||||||
|
diu+C27608WmPEnDLy58yCameZ4sk/Pt269yhHerEuPrSFKrqVQOyyO9utCQHbRY
|
||||||
|
9wjvymJnXAvJE4CgXvdYLIFvaog86KmhpVX830gnyFdJ+d7EDpUU9w==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
|
@ -2,124 +2,109 @@ version: '3.4'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
eventstore.db:
|
eventstore.db:
|
||||||
image: eventstore/eventstore:release-5.0.8
|
image: eventstore/eventstore:21.10.8-buster-slim
|
||||||
environment:
|
environment:
|
||||||
- EVENTSTORE_WORKER_THREADS=5
|
|
||||||
- EVENTSTORE_CLUSTER_SIZE=3
|
- EVENTSTORE_CLUSTER_SIZE=3
|
||||||
|
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
|
||||||
|
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=node1.tests.node-eventstore-client.local
|
||||||
|
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
|
||||||
|
- EVENTSTORE_ADVERTISE_TCP_PORT_TO_CLIENT_AS=1113
|
||||||
|
# - EVENTSTORE_DISCOVER_VIA_DNS=false
|
||||||
|
# - EVENTSTORE_GOSSIP_SEED=192.168.33.10:2113,192.168.33.11:2113,192.168.33.12:2113
|
||||||
- EVENTSTORE_RUN_PROJECTIONS=All
|
- EVENTSTORE_RUN_PROJECTIONS=All
|
||||||
- EVENTSTORE_DB=/var/lib/eventstore-data
|
- EVENTSTORE_START_STANDARD_PROJECTIONS=True
|
||||||
- EVENTSTORE_INDEX=/var/lib/eventstore-index
|
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
|
||||||
- EVENTSTORE_LOG=/var/log/eventstore
|
|
||||||
- EVENTSTORE_CLUSTER_GOSSIP_PORT=2112
|
|
||||||
- EVENTSTORE_INT_TCP_PORT=1112
|
|
||||||
- EVENTSTORE_EXT_TCP_PORT=1113
|
- EVENTSTORE_EXT_TCP_PORT=1113
|
||||||
- EVENTSTORE_INT_HTTP_PORT=2112
|
- EVENTSTORE_HTTP_PORT=2113
|
||||||
- EVENTSTORE_EXT_HTTP_PORT=2113
|
|
||||||
- EVENTSTORE_DISCOVER_VIA_DNS=true
|
|
||||||
- EVENTSTORE_CLUSTER_DNS=eventstore.local
|
|
||||||
- EVENTSTORE_INT_IP=192.168.33.10
|
- EVENTSTORE_INT_IP=192.168.33.10
|
||||||
- EVENTSTORE_EXT_IP=192.168.33.10
|
- EVENTSTORE_EXT_IP=192.168.33.10
|
||||||
|
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node1/node1.crt
|
||||||
|
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node1/node1.key
|
||||||
|
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
|
||||||
ports:
|
ports:
|
||||||
- "1112:1112"
|
- "1112:1112"
|
||||||
- "1113:1113"
|
- "1113:1113"
|
||||||
- "2112:2112"
|
|
||||||
- "2113:2113"
|
- "2113:2113"
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
aliases:
|
aliases:
|
||||||
- eventstore.local
|
- cluster.tests.node-eventstore-client.local
|
||||||
|
- node1.tests.node-eventstore-client.local
|
||||||
ipv4_address: 192.168.33.10
|
ipv4_address: 192.168.33.10
|
||||||
volumes:
|
volumes:
|
||||||
- type: volume
|
- eventstore1-data:/var/lib/eventstore
|
||||||
source: eventstore-volume-data
|
- ./certs:/etc/eventstore/certs:ro
|
||||||
target: /var/lib/eventstore-data
|
|
||||||
- type: volume
|
|
||||||
source: eventstore-volume-index
|
|
||||||
target: /var/lib/eventstore-index
|
|
||||||
- type: volume
|
|
||||||
source: eventstore-volume-logs
|
|
||||||
target: /var/log/eventstore
|
|
||||||
|
|
||||||
eventstore.db2:
|
eventstore.db2:
|
||||||
image: eventstore/eventstore:release-5.0.8
|
image: eventstore/eventstore:21.10.8-buster-slim
|
||||||
environment:
|
environment:
|
||||||
- EVENTSTORE_WORKER_THREADS=5
|
|
||||||
- EVENTSTORE_CLUSTER_SIZE=3
|
- EVENTSTORE_CLUSTER_SIZE=3
|
||||||
|
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
|
||||||
|
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=node2.tests.node-eventstore-client.local
|
||||||
|
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
|
||||||
|
- EVENTSTORE_ADVERTISE_TCP_PORT_TO_CLIENT_AS=1113
|
||||||
|
# - EVENTSTORE_DISCOVER_VIA_DNS=false
|
||||||
|
# - EVENTSTORE_GOSSIP_SEED=192.168.33.10:2113,192.168.33.11:2113,192.168.33.12:2113
|
||||||
- EVENTSTORE_RUN_PROJECTIONS=All
|
- EVENTSTORE_RUN_PROJECTIONS=All
|
||||||
- EVENTSTORE_DB=/var/lib/eventstore-data
|
- EVENTSTORE_START_STANDARD_PROJECTIONS=True
|
||||||
- EVENTSTORE_INDEX=/var/lib/eventstore-index
|
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
|
||||||
- EVENTSTORE_LOG=/var/log/eventstore
|
|
||||||
- EVENTSTORE_CLUSTER_GOSSIP_PORT=2112
|
|
||||||
- EVENTSTORE_INT_TCP_PORT=1112
|
|
||||||
- EVENTSTORE_EXT_TCP_PORT=1113
|
- EVENTSTORE_EXT_TCP_PORT=1113
|
||||||
- EVENTSTORE_INT_HTTP_PORT=2112
|
- EVENTSTORE_HTTP_PORT=2113
|
||||||
- EVENTSTORE_EXT_HTTP_PORT=2113
|
|
||||||
- EVENTSTORE_DISCOVER_VIA_DNS=true
|
|
||||||
- EVENTSTORE_CLUSTER_DNS=eventstore.local
|
|
||||||
- EVENTSTORE_INT_IP=192.168.33.11
|
- EVENTSTORE_INT_IP=192.168.33.11
|
||||||
- EVENTSTORE_EXT_IP=192.168.33.11
|
- EVENTSTORE_EXT_IP=192.168.33.11
|
||||||
|
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node2/node2.crt
|
||||||
|
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node2/node2.key
|
||||||
|
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
|
||||||
expose:
|
expose:
|
||||||
- "1113"
|
- "1113"
|
||||||
- "1112"
|
- "1112"
|
||||||
- "2112"
|
|
||||||
- "2113"
|
- "2113"
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
aliases:
|
aliases:
|
||||||
- eventstore.local
|
- cluster.tests.node-eventstore-client.local
|
||||||
|
- node2.tests.node-eventstore-client.local
|
||||||
ipv4_address: 192.168.33.11
|
ipv4_address: 192.168.33.11
|
||||||
volumes:
|
volumes:
|
||||||
- type: volume
|
- eventstore2-data:/var/lib/eventstore
|
||||||
source: eventstore-volume-data2
|
- ./certs:/etc/eventstore/certs:ro
|
||||||
target: /var/lib/eventstore-data
|
|
||||||
- type: volume
|
|
||||||
source: eventstore-volume-index2
|
|
||||||
target: /var/lib/eventstore-index
|
|
||||||
- type: volume
|
|
||||||
source: eventstore-volume-logs2
|
|
||||||
target: /var/log/eventstore
|
|
||||||
|
|
||||||
eventstore.db3:
|
eventstore.db3:
|
||||||
image: eventstore/eventstore:release-5.0.8
|
image: eventstore/eventstore:21.10.8-buster-slim
|
||||||
environment:
|
environment:
|
||||||
- EVENTSTORE_WORKER_THREADS=5
|
|
||||||
- EVENTSTORE_CLUSTER_SIZE=3
|
- EVENTSTORE_CLUSTER_SIZE=3
|
||||||
|
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
|
||||||
|
- EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=node3.tests.node-eventstore-client.local
|
||||||
|
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
|
||||||
|
- EVENTSTORE_ADVERTISE_TCP_PORT_TO_CLIENT_AS=1113
|
||||||
|
# - EVENTSTORE_DISCOVER_VIA_DNS=false
|
||||||
|
# - EVENTSTORE_GOSSIP_SEED=192.168.33.10:2113,192.168.33.11:2113,192.168.33.12:2113
|
||||||
- EVENTSTORE_RUN_PROJECTIONS=All
|
- EVENTSTORE_RUN_PROJECTIONS=All
|
||||||
- EVENTSTORE_DB=/var/lib/eventstore-data
|
- EVENTSTORE_START_STANDARD_PROJECTIONS=True
|
||||||
- EVENTSTORE_INDEX=/var/lib/eventstore-index
|
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
|
||||||
- EVENTSTORE_LOG=/var/log/eventstore
|
|
||||||
- EVENTSTORE_CLUSTER_GOSSIP_PORT=2112
|
|
||||||
- EVENTSTORE_INT_TCP_PORT=1112
|
|
||||||
- EVENTSTORE_EXT_TCP_PORT=1113
|
- EVENTSTORE_EXT_TCP_PORT=1113
|
||||||
- EVENTSTORE_INT_HTTP_PORT=2112
|
- EVENTSTORE_HTTP_PORT=2113
|
||||||
- EVENTSTORE_EXT_HTTP_PORT=2113
|
|
||||||
- EVENTSTORE_DISCOVER_VIA_DNS=true
|
|
||||||
- EVENTSTORE_CLUSTER_DNS=eventstore.local
|
|
||||||
- EVENTSTORE_INT_IP=192.168.33.12
|
- EVENTSTORE_INT_IP=192.168.33.12
|
||||||
- EVENTSTORE_EXT_IP=192.168.33.12
|
- EVENTSTORE_EXT_IP=192.168.33.12
|
||||||
|
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node3/node3.crt
|
||||||
|
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node3/node3.key
|
||||||
|
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
|
||||||
expose:
|
expose:
|
||||||
- "1113"
|
- "1113"
|
||||||
- "1112"
|
- "1112"
|
||||||
- "2112"
|
|
||||||
- "2113"
|
- "2113"
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
aliases:
|
aliases:
|
||||||
- eventstore.local
|
- cluster.tests.node-eventstore-client.local
|
||||||
|
- node3.tests.node-eventstore-client.local
|
||||||
ipv4_address: 192.168.33.12
|
ipv4_address: 192.168.33.12
|
||||||
volumes:
|
volumes:
|
||||||
- type: volume
|
- eventstore3-data:/var/lib/eventstore-data
|
||||||
source: eventstore-volume-data3
|
- ./certs:/etc/eventstore/certs:ro
|
||||||
target: /var/lib/eventstore-data
|
|
||||||
- type: volume
|
|
||||||
source: eventstore-volume-index3
|
|
||||||
target: /var/lib/eventstore-index
|
|
||||||
- type: volume
|
|
||||||
source: eventstore-volume-logs3
|
|
||||||
target: /var/log/eventstore
|
|
||||||
|
|
||||||
nodejs:
|
nodejs:
|
||||||
image: node:14
|
image: node:12
|
||||||
working_dir: /var/code
|
working_dir: /var/code
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/code
|
- .:/var/code
|
||||||
|
@ -129,15 +114,9 @@ services:
|
||||||
- app_net
|
- app_net
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
eventstore-volume-data:
|
eventstore1-data:
|
||||||
eventstore-volume-index:
|
eventstore2-data:
|
||||||
eventstore-volume-logs:
|
eventstore3-data:
|
||||||
eventstore-volume-data2:
|
|
||||||
eventstore-volume-index2:
|
|
||||||
eventstore-volume-logs2:
|
|
||||||
eventstore-volume-data3:
|
|
||||||
eventstore-volume-index3:
|
|
||||||
eventstore-volume-logs3:
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
|
|
|
@ -12,22 +12,21 @@ services:
|
||||||
- EVENTSTORE_HTTP_PORT=2113
|
- EVENTSTORE_HTTP_PORT=2113
|
||||||
- EVENTSTORE_INT_IP=192.168.33.10
|
- EVENTSTORE_INT_IP=192.168.33.10
|
||||||
- EVENTSTORE_EXT_IP=192.168.33.10
|
- EVENTSTORE_EXT_IP=192.168.33.10
|
||||||
- EVENTSTORE_CERTIFICATE_FILE=/eventstore.p12
|
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node1/node1.crt
|
||||||
- EVENTSTORE_CERTIFICATE_PASSWORD=eventstore
|
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node1/node1.key
|
||||||
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/ssl/certs
|
- EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
|
||||||
ports:
|
ports:
|
||||||
- "1113:1113"
|
- "1113:1113"
|
||||||
- "2113:2113"
|
- "2113:2113"
|
||||||
volumes:
|
volumes:
|
||||||
- eventstore-data:/var/lib/eventstore
|
- eventstore-data:/var/lib/eventstore
|
||||||
- ./certs/eventstore.p12:/eventstore.p12:ro
|
- ./certs:/etc/eventstore/certs:ro
|
||||||
- ./certs/eventstore-local.crt:/etc/ssl/certs/eventstore.crt:ro
|
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: 192.168.33.10
|
ipv4_address: 192.168.33.10
|
||||||
|
|
||||||
nodejs:
|
nodejs:
|
||||||
image: node:14
|
image: node:12
|
||||||
working_dir: /var/code
|
working_dir: /var/code
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/code
|
- .:/var/code
|
||||||
|
|
2482
package-lock.json
generated
2482
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "node-eventstore-client",
|
"name": "node-eventstore-client",
|
||||||
"version": "0.2.17",
|
"version": "21.10.0",
|
||||||
"description": "A port of the EventStore .Net ClientAPI to Node.js",
|
"description": "A port of the EventStore .Net ClientAPI to Node.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=5.10"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
"engineStrict": true,
|
"engineStrict": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
"compose:cluster:start": "docker-compose -f docker-compose-cluster.yaml up --build -d",
|
"compose:cluster:start": "docker-compose -f docker-compose-cluster.yaml up --build -d",
|
||||||
"compose:single:stop": "docker-compose -f docker-compose-single.yaml down -v --remove-orphans",
|
"compose:single:stop": "docker-compose -f docker-compose-single.yaml down -v --remove-orphans",
|
||||||
"compose:cluster:stop": "docker-compose -f docker-compose-cluster.yaml down -v --remove-orphans",
|
"compose:cluster:stop": "docker-compose -f docker-compose-cluster.yaml down -v --remove-orphans",
|
||||||
"compose:wait": "while [[ \"$(curl -s -o /dev/null -w ''%{http_code}'' localhost:2113/ping)\" != \"200\" ]]; do sleep 5; done",
|
"compose:wait": "while [ \"$(curl -s -o /dev/null -w ''%{http_code}'' -k https://localhost:2113/ping)\" != \"200\" ]; do sleep 5; done",
|
||||||
"compose:single:test": "docker-compose -f docker-compose-single.yaml exec nodejs bash -c \"npm i && npm run build && EVENTSTORE_CONNECTION_TYPE=tcp EVENTSTORE_HOST=192.168.33.10 npm run test-debug\"",
|
"compose:single:test": "docker-compose -f docker-compose-single.yaml exec nodejs bash -c \"npm i && npm run build && EVENTSTORE_CONNECTION_TYPE=tcp EVENTSTORE_HOST=192.168.33.10 npm run test-debug\"",
|
||||||
"compose:cluster:test": "docker-compose -f docker-compose-cluster.yaml exec nodejs bash -c \"npm i && npm run build && EVENTSTORE_CONNECTION_TYPE=gossip EVENTSTORE_HOST=192.168.33.10 EVENTSTORE_HOST_1=192.168.33.10 EVENTSTORE_HOST_2=192.168.33.11 EVENTSTORE_HOST_3=192.168.33.12 npm run test-debug\"",
|
"compose:cluster:test": "docker-compose -f docker-compose-cluster.yaml exec nodejs bash -c \"npm i && npm run build && EVENTSTORE_CONNECTION_TYPE=gossip EVENTSTORE_HOST=192.168.33.10 EVENTSTORE_HOST_1=192.168.33.10 EVENTSTORE_HOST_2=192.168.33.11 EVENTSTORE_HOST_3=192.168.33.12 npm run test-debug\"",
|
||||||
"compose:gossip:test": "docker-compose -f docker-compose-cluster.yaml exec nodejs bash -c \"npm i && npm run build && EVENTSTORE_CONNECTION_TYPE=dns EVENTSTORE_HOST=192.168.33.10 npm run test-debug\"",
|
"compose:gossip:test": "docker-compose -f docker-compose-cluster.yaml exec nodejs bash -c \"npm i && npm run build && EVENTSTORE_CONNECTION_TYPE=dns EVENTSTORE_HOST=192.168.33.10 npm run test-debug\"",
|
||||||
|
@ -58,12 +58,12 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/nicdex/node-eventstore-client#readme",
|
"homepage": "https://github.com/nicdex/node-eventstore-client#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/long": "^3.0.32",
|
"@types/node": ">=12",
|
||||||
"@types/node": ">=5.10",
|
"long": "^5.2.0",
|
||||||
"long": "^3.2.0",
|
"protobufjs": "^7.1.2",
|
||||||
"protobufjs": "^6.8.8",
|
"protobufjs-cli": "^1.0.2",
|
||||||
"strict-event-emitter-types": "^1.2.0",
|
"strict-event-emitter-types": "^1.2.0",
|
||||||
"uuid": "^3.0.1"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"jest": "^26.4.2",
|
"jest": "^26.4.2",
|
||||||
|
|
|
@ -37,7 +37,7 @@ AppendToStreamOperation.prototype._createRequestDto = function() {
|
||||||
eventStreamId: this._stream,
|
eventStreamId: this._stream,
|
||||||
expectedVersion: this._expectedVersion,
|
expectedVersion: this._expectedVersion,
|
||||||
events: dtos,
|
events: dtos,
|
||||||
requireMaster: this._requireMaster});
|
requireLeader: this._requireMaster});
|
||||||
};
|
};
|
||||||
|
|
||||||
AppendToStreamOperation.prototype._inspectResponse = function(response) {
|
AppendToStreamOperation.prototype._inspectResponse = function(response) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ util.inherits(CommitTransactionOperation, OperationBase);
|
||||||
CommitTransactionOperation.prototype._createRequestDto = function() {
|
CommitTransactionOperation.prototype._createRequestDto = function() {
|
||||||
return new ClientMessage.TransactionCommit({
|
return new ClientMessage.TransactionCommit({
|
||||||
transactionId: this._transactionId,
|
transactionId: this._transactionId,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ DeleteStreamOperation.prototype._createRequestDto = function() {
|
||||||
return new ClientMessage.DeleteStream({
|
return new ClientMessage.DeleteStream({
|
||||||
eventStreamId: this._stream,
|
eventStreamId: this._stream,
|
||||||
expectedVersion: this._expectedVersion,
|
expectedVersion: this._expectedVersion,
|
||||||
requireMaster: this._requireMaster,
|
requireLeader: this._requireMaster,
|
||||||
hardDelete: this._hardDelete
|
hardDelete: this._hardDelete
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -117,9 +117,9 @@ OperationBase.prototype._inspectNotHandled = function(pkg)
|
||||||
case ClientMessage.NotHandled.NotHandledReason.TooBusy:
|
case ClientMessage.NotHandled.NotHandledReason.TooBusy:
|
||||||
return new InspectionResult(InspectionDecision.Retry, "NotHandled - TooBusy");
|
return new InspectionResult(InspectionDecision.Retry, "NotHandled - TooBusy");
|
||||||
|
|
||||||
case ClientMessage.NotHandled.NotHandledReason.NotMaster:
|
case ClientMessage.NotHandled.NotHandledReason.NotLeader:
|
||||||
var masterInfo = ClientMessage.NotHandled.MasterInfo.decode(message.additionalInfo);
|
var masterInfo = ClientMessage.NotHandled.LeaderInfo.decode(message.additionalInfo);
|
||||||
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotMaster",
|
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotLeader",
|
||||||
{host: masterInfo.externalTcpAddress, port: masterInfo.externalTcpPort},
|
{host: masterInfo.externalTcpAddress, port: masterInfo.externalTcpPort},
|
||||||
{host: masterInfo.externalSecureTcpAddress, port: masterInfo.externalSecureTcpPort});
|
{host: masterInfo.externalSecureTcpAddress, port: masterInfo.externalSecureTcpPort});
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ ReadAllEventsBackwardOperation.prototype._createRequestDto = function() {
|
||||||
preparePosition: this._position.preparePosition,
|
preparePosition: this._position.preparePosition,
|
||||||
maxCount: this._maxCount,
|
maxCount: this._maxCount,
|
||||||
resolveLinkTos: this._resolveLinkTos,
|
resolveLinkTos: this._resolveLinkTos,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ ReadAllEventsForwardOperation.prototype._createRequestDto = function() {
|
||||||
preparePosition: this._position.preparePosition,
|
preparePosition: this._position.preparePosition,
|
||||||
maxCount: this._maxCount,
|
maxCount: this._maxCount,
|
||||||
resolveLinkTos: this._resolveLinkTos,
|
resolveLinkTos: this._resolveLinkTos,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ ReadEventOperation.prototype._createRequestDto = function() {
|
||||||
eventStreamId: this._stream,
|
eventStreamId: this._stream,
|
||||||
eventNumber: this._eventNumber,
|
eventNumber: this._eventNumber,
|
||||||
resolveLinkTos: this._resolveLinkTos,
|
resolveLinkTos: this._resolveLinkTos,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ ReadStreamEventsBackwardOperation.prototype._createRequestDto = function() {
|
||||||
fromEventNumber: this._fromEventNumber,
|
fromEventNumber: this._fromEventNumber,
|
||||||
maxCount: this._maxCount,
|
maxCount: this._maxCount,
|
||||||
resolveLinkTos: this._resolveLinkTos,
|
resolveLinkTos: this._resolveLinkTos,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ ReadStreamEventsForwardOperation.prototype._createRequestDto = function() {
|
||||||
fromEventNumber: this._fromEventNumber,
|
fromEventNumber: this._fromEventNumber,
|
||||||
maxCount: this._maxCount,
|
maxCount: this._maxCount,
|
||||||
resolveLinkTos: this._resolveLinkTos,
|
resolveLinkTos: this._resolveLinkTos,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ StartTransactionOperation.prototype._createRequestDto = function() {
|
||||||
return new ClientMessage.TransactionStart({
|
return new ClientMessage.TransactionStart({
|
||||||
eventStreamId: this._stream,
|
eventStreamId: this._stream,
|
||||||
expectedVersion: this._expectedVersion,
|
expectedVersion: this._expectedVersion,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -137,9 +137,9 @@ SubscriptionOperation.prototype.inspectPackage = function(pkg) {
|
||||||
case ClientMessage.NotHandled.NotHandledReason.TooBusy:
|
case ClientMessage.NotHandled.NotHandledReason.TooBusy:
|
||||||
return new InspectionResult(InspectionDecision.Retry, "NotHandled - TooBusy");
|
return new InspectionResult(InspectionDecision.Retry, "NotHandled - TooBusy");
|
||||||
|
|
||||||
case ClientMessage.NotHandled.NotHandledReason.NotMaster:
|
case ClientMessage.NotHandled.NotHandledReason.NotLeader:
|
||||||
var masterInfo = ClientMessage.NotHandled.MasterInfo.decode(message.additionalInfo);
|
var masterInfo = ClientMessage.NotHandled.LeaderInfo.decode(message.additionalInfo);
|
||||||
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotMaster",
|
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotLeader",
|
||||||
{host: masterInfo.externalTcpAddress, port: masterInfo.externalTcpPort},
|
{host: masterInfo.externalTcpAddress, port: masterInfo.externalTcpPort},
|
||||||
{host: masterInfo.externalSecureTcpAddress, port: masterInfo.externalSecureTcpPort});
|
{host: masterInfo.externalSecureTcpAddress, port: masterInfo.externalSecureTcpPort});
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ TransactionalWriteOperation.prototype._createRequestDto = function() {
|
||||||
return new ClientMessage.TransactionWrite({
|
return new ClientMessage.TransactionWrite({
|
||||||
transactionId: this._transactionId,
|
transactionId: this._transactionId,
|
||||||
events: dtos,
|
events: dtos,
|
||||||
requireMaster: this._requireMaster
|
requireLeader: this._requireMaster
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ ClusterDiscoverer.prototype._getGossipCandidates = async function (managerExtern
|
||||||
this._settings.seeds && this._settings.seeds.length > 0
|
this._settings.seeds && this._settings.seeds.length > 0
|
||||||
? this._settings.seeds
|
? this._settings.seeds
|
||||||
: (await this._resolveDns(this._settings.clusterDns)).map(
|
: (await this._resolveDns(this._settings.clusterDns)).map(
|
||||||
(address) => new GossipSeed({ host: address, port: managerExternalHttpPort }, undefined)
|
(address) => new GossipSeed({ host: address, port: managerExternalHttpPort }, address, this._settings.clusterDns)
|
||||||
);
|
);
|
||||||
return shuffle(gossipSeeds);
|
return shuffle(gossipSeeds);
|
||||||
};
|
};
|
||||||
|
@ -109,12 +109,14 @@ ClusterDiscoverer.prototype._resolveDns = async function (clusterDns) {
|
||||||
* @returns {Promise.<ClusterInfo>}
|
* @returns {Promise.<ClusterInfo>}
|
||||||
*/
|
*/
|
||||||
ClusterDiscoverer.prototype._clusterInfo = async function (candidate, timeout) {
|
ClusterDiscoverer.prototype._clusterInfo = async function (candidate, timeout) {
|
||||||
|
var self = this;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const options = {
|
const options = {
|
||||||
host: candidate.endPoint.host,
|
host: candidate.endPoint.host,
|
||||||
port: candidate.endPoint.port,
|
port: candidate.endPoint.port,
|
||||||
path: '/gossip?format=json',
|
path: '/gossip?format=json',
|
||||||
timeout: timeout,
|
timeout: timeout,
|
||||||
|
rejectUnauthorized: self._settings.rejectUnauthorized
|
||||||
};
|
};
|
||||||
if (candidate.hostHeader) {
|
if (candidate.hostHeader) {
|
||||||
options.headers = {
|
options.headers = {
|
||||||
|
|
|
@ -2,16 +2,21 @@ const MemberInfo = require('./memberInfo.js');
|
||||||
|
|
||||||
const VNodeStates = Object.freeze({
|
const VNodeStates = Object.freeze({
|
||||||
Initializing: 0,
|
Initializing: 0,
|
||||||
Unknown: 1,
|
DiscoverLeader: 1,
|
||||||
PreReplica: 2,
|
Unknown: 2,
|
||||||
CatchingUp: 3,
|
PreReplica: 3,
|
||||||
Clone: 4,
|
CatchingUp: 4,
|
||||||
Slave: 5,
|
Clone: 5,
|
||||||
PreMaster: 6,
|
Follower: 6,
|
||||||
Master: 7,
|
PreLeader: 7,
|
||||||
Manager: 8,
|
Leader: 8,
|
||||||
ShuttingDown: 9,
|
Manager: 9,
|
||||||
Shutdown: 10
|
ShuttingDown: 10,
|
||||||
|
Shutdown: 11,
|
||||||
|
ReadOnlyLeaderless: 12,
|
||||||
|
PreReadOnlyReplica: 13,
|
||||||
|
ReadOnlyReplica: 14,
|
||||||
|
ResigningLeader: 15,
|
||||||
});
|
});
|
||||||
|
|
||||||
function ClusterInfo(members) {
|
function ClusterInfo(members) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ var ensure = require('./common/utils/ensure');
|
||||||
|
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
|
const https = require('https');
|
||||||
const dns = require('dns');
|
const dns = require('dns');
|
||||||
|
|
||||||
const dnsService = {
|
const dnsService = {
|
||||||
|
@ -95,13 +96,14 @@ function createFromClusterDns(connectionSettings, clusterDns, externalGossipPort
|
||||||
managerExternalHttpPort: externalGossipPort,
|
managerExternalHttpPort: externalGossipPort,
|
||||||
maxDiscoverAttempts: mergedSettings.maxDiscoverAttempts,
|
maxDiscoverAttempts: mergedSettings.maxDiscoverAttempts,
|
||||||
discoverDelay: mergedSettings.discoverDelay,
|
discoverDelay: mergedSettings.discoverDelay,
|
||||||
gossipTimeout: mergedSettings.gossipTimeout
|
gossipTimeout: mergedSettings.gossipTimeout,
|
||||||
|
rejectUnauthorized: connectionSettings.useSslConnection ? connectionSettings.validateServer : undefined
|
||||||
};
|
};
|
||||||
var endPointDiscoverer = new ClusterDiscoverer(
|
var endPointDiscoverer = new ClusterDiscoverer(
|
||||||
mergedSettings.log,
|
mergedSettings.log,
|
||||||
clusterSettings,
|
clusterSettings,
|
||||||
dnsService,
|
dnsService,
|
||||||
http
|
connectionSettings.useSslConnection ? https : http
|
||||||
);
|
);
|
||||||
return new EventStoreNodeConnection(mergedSettings, clusterSettings, endPointDiscoverer, connectionName);
|
return new EventStoreNodeConnection(mergedSettings, clusterSettings, endPointDiscoverer, connectionName);
|
||||||
}
|
}
|
||||||
|
@ -116,13 +118,14 @@ function createFromGossipSeeds(connectionSettings, gossipSeeds, connectionName)
|
||||||
externalGossipPort: 0,
|
externalGossipPort: 0,
|
||||||
maxDiscoverAttempts: mergedSettings.maxDiscoverAttempts,
|
maxDiscoverAttempts: mergedSettings.maxDiscoverAttempts,
|
||||||
discoverDelay: mergedSettings.discoverDelay,
|
discoverDelay: mergedSettings.discoverDelay,
|
||||||
gossipTimeout: mergedSettings.gossipTimeout
|
gossipTimeout: mergedSettings.gossipTimeout,
|
||||||
|
rejectUnauthorized: connectionSettings.useSslConnection ? connectionSettings.validateServer : undefined
|
||||||
};
|
};
|
||||||
var endPointDiscoverer = new ClusterDiscoverer(
|
var endPointDiscoverer = new ClusterDiscoverer(
|
||||||
mergedSettings.log,
|
mergedSettings.log,
|
||||||
clusterSettings,
|
clusterSettings,
|
||||||
dnsService,
|
dnsService,
|
||||||
http
|
connectionSettings.useSslConnection ? https : http
|
||||||
);
|
);
|
||||||
return new EventStoreNodeConnection(mergedSettings, clusterSettings, endPointDiscoverer, connectionName);
|
return new EventStoreNodeConnection(mergedSettings, clusterSettings, endPointDiscoverer, connectionName);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,5 @@
|
||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
package EventStore.Client.Messages;
|
package EventStore.Client.Messages;
|
||||||
|
|
||||||
enum OperationResult
|
enum OperationResult
|
||||||
|
@ -50,7 +52,7 @@ message WriteEvents {
|
||||||
required string event_stream_id = 1;
|
required string event_stream_id = 1;
|
||||||
required int64 expected_version = 2;
|
required int64 expected_version = 2;
|
||||||
repeated NewEvent events = 3;
|
repeated NewEvent events = 3;
|
||||||
required bool require_master = 4;
|
required bool require_leader = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message WriteEventsCompleted {
|
message WriteEventsCompleted {
|
||||||
|
@ -66,7 +68,7 @@ message WriteEventsCompleted {
|
||||||
message DeleteStream {
|
message DeleteStream {
|
||||||
required string event_stream_id = 1;
|
required string event_stream_id = 1;
|
||||||
required int64 expected_version = 2;
|
required int64 expected_version = 2;
|
||||||
required bool require_master = 3;
|
required bool require_leader = 3;
|
||||||
optional bool hard_delete = 4;
|
optional bool hard_delete = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,12 +77,13 @@ message DeleteStreamCompleted {
|
||||||
optional string message = 2;
|
optional string message = 2;
|
||||||
optional int64 prepare_position = 3;
|
optional int64 prepare_position = 3;
|
||||||
optional int64 commit_position = 4;
|
optional int64 commit_position = 4;
|
||||||
|
optional int64 current_version = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TransactionStart {
|
message TransactionStart {
|
||||||
required string event_stream_id = 1;
|
required string event_stream_id = 1;
|
||||||
required int64 expected_version = 2;
|
required int64 expected_version = 2;
|
||||||
required bool require_master = 3;
|
required bool require_leader = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TransactionStartCompleted {
|
message TransactionStartCompleted {
|
||||||
|
@ -92,7 +95,7 @@ message TransactionStartCompleted {
|
||||||
message TransactionWrite {
|
message TransactionWrite {
|
||||||
required int64 transaction_id = 1;
|
required int64 transaction_id = 1;
|
||||||
repeated NewEvent events = 2;
|
repeated NewEvent events = 2;
|
||||||
required bool require_master = 3;
|
required bool require_leader = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TransactionWriteCompleted {
|
message TransactionWriteCompleted {
|
||||||
|
@ -103,7 +106,7 @@ message TransactionWriteCompleted {
|
||||||
|
|
||||||
message TransactionCommit {
|
message TransactionCommit {
|
||||||
required int64 transaction_id = 1;
|
required int64 transaction_id = 1;
|
||||||
required bool require_master = 2;
|
required bool require_leader = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TransactionCommitCompleted {
|
message TransactionCommitCompleted {
|
||||||
|
@ -120,7 +123,7 @@ message ReadEvent {
|
||||||
required string event_stream_id = 1;
|
required string event_stream_id = 1;
|
||||||
required int64 event_number = 2;
|
required int64 event_number = 2;
|
||||||
required bool resolve_link_tos = 3;
|
required bool resolve_link_tos = 3;
|
||||||
required bool require_master = 4;
|
required bool require_leader = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ReadEventCompleted {
|
message ReadEventCompleted {
|
||||||
|
@ -145,7 +148,7 @@ message ReadStreamEvents {
|
||||||
required int64 from_event_number = 2;
|
required int64 from_event_number = 2;
|
||||||
required int32 max_count = 3;
|
required int32 max_count = 3;
|
||||||
required bool resolve_link_tos = 4;
|
required bool resolve_link_tos = 4;
|
||||||
required bool require_master = 5;
|
required bool require_leader = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ReadStreamEventsCompleted {
|
message ReadStreamEventsCompleted {
|
||||||
|
@ -174,7 +177,7 @@ message ReadAllEvents {
|
||||||
required int64 prepare_position = 2;
|
required int64 prepare_position = 2;
|
||||||
required int32 max_count = 3;
|
required int32 max_count = 3;
|
||||||
required bool resolve_link_tos = 4;
|
required bool resolve_link_tos = 4;
|
||||||
required bool require_master = 5;
|
required bool require_leader = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ReadAllEventsCompleted {
|
message ReadAllEventsCompleted {
|
||||||
|
@ -196,6 +199,54 @@ message ReadAllEventsCompleted {
|
||||||
optional string error = 7;
|
optional string error = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message Filter{
|
||||||
|
|
||||||
|
enum FilterContext {
|
||||||
|
StreamId = 0;
|
||||||
|
EventType = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
enum FilterType {
|
||||||
|
Regex = 0;
|
||||||
|
Prefix = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
required FilterContext context = 1;
|
||||||
|
required FilterType type = 2;
|
||||||
|
repeated string data = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FilteredReadAllEvents {
|
||||||
|
required int64 commit_position = 1;
|
||||||
|
required int64 prepare_position = 2;
|
||||||
|
required int32 max_count = 3;
|
||||||
|
optional int32 max_search_window = 4;
|
||||||
|
required bool resolve_link_tos = 5;
|
||||||
|
required bool require_leader = 6;
|
||||||
|
required Filter filter = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FilteredReadAllEventsCompleted {
|
||||||
|
|
||||||
|
enum FilteredReadAllResult {
|
||||||
|
Success = 0;
|
||||||
|
NotModified = 1;
|
||||||
|
Error = 2;
|
||||||
|
AccessDenied = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
required int64 commit_position = 1;
|
||||||
|
required int64 prepare_position = 2;
|
||||||
|
repeated ResolvedEvent events = 3;
|
||||||
|
required int64 next_commit_position = 4;
|
||||||
|
required int64 next_prepare_position = 5;
|
||||||
|
required bool is_end_of_stream = 6;
|
||||||
|
|
||||||
|
optional FilteredReadAllResult result = 7 [default = Success];
|
||||||
|
optional string error = 8;
|
||||||
|
}
|
||||||
|
|
||||||
message CreatePersistentSubscription {
|
message CreatePersistentSubscription {
|
||||||
required string subscription_group_name = 1;
|
required string subscription_group_name = 1;
|
||||||
required string event_stream_id = 2;
|
required string event_stream_id = 2;
|
||||||
|
@ -307,6 +358,7 @@ message PersistentSubscriptionConfirmation {
|
||||||
|
|
||||||
message PersistentSubscriptionStreamEventAppeared {
|
message PersistentSubscriptionStreamEventAppeared {
|
||||||
required ResolvedIndexedEvent event = 1;
|
required ResolvedIndexedEvent event = 1;
|
||||||
|
optional int32 retryCount = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SubscribeToStream {
|
message SubscribeToStream {
|
||||||
|
@ -314,6 +366,18 @@ message SubscribeToStream {
|
||||||
required bool resolve_link_tos = 2;
|
required bool resolve_link_tos = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message FilteredSubscribeToStream {
|
||||||
|
required string event_stream_id = 1;
|
||||||
|
required bool resolve_link_tos = 2;
|
||||||
|
required Filter filter = 3;
|
||||||
|
required int32 checkpoint_interval = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CheckpointReached {
|
||||||
|
required int64 commit_position = 1;
|
||||||
|
required int64 prepare_position = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message SubscriptionConfirmation {
|
message SubscriptionConfirmation {
|
||||||
required int64 last_commit_position = 1;
|
required int64 last_commit_position = 1;
|
||||||
optional int64 last_event_number = 2;
|
optional int64 last_event_number = 2;
|
||||||
|
@ -344,17 +408,18 @@ message NotHandled {
|
||||||
enum NotHandledReason {
|
enum NotHandledReason {
|
||||||
NotReady = 0;
|
NotReady = 0;
|
||||||
TooBusy = 1;
|
TooBusy = 1;
|
||||||
NotMaster = 2;
|
NotLeader = 2;
|
||||||
|
IsReadOnly = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
required NotHandledReason reason = 1;
|
required NotHandledReason reason = 1;
|
||||||
optional bytes additional_info = 2;
|
optional bytes additional_info = 2;
|
||||||
|
|
||||||
message MasterInfo {
|
message LeaderInfo {
|
||||||
required string external_tcp_address = 1;
|
optional string external_tcp_address = 1;
|
||||||
required int32 external_tcp_port = 2;
|
optional int32 external_tcp_port = 2;
|
||||||
required string external_http_address = 3;
|
required string http_address = 3;
|
||||||
required int32 external_http_port = 4;
|
required int32 http_port = 4;
|
||||||
optional string external_secure_tcp_address = 5;
|
optional string external_secure_tcp_address = 5;
|
||||||
optional int32 external_secure_tcp_port = 6;
|
optional int32 external_secure_tcp_port = 6;
|
||||||
}
|
}
|
||||||
|
@ -363,18 +428,17 @@ message NotHandled {
|
||||||
message ScavengeDatabase {
|
message ScavengeDatabase {
|
||||||
}
|
}
|
||||||
|
|
||||||
message ScavengeDatabaseCompleted {
|
message ScavengeDatabaseResponse {
|
||||||
|
|
||||||
enum ScavengeResult {
|
enum ScavengeResult {
|
||||||
Success = 0;
|
Started = 0;
|
||||||
InProgress = 1;
|
InProgress = 1;
|
||||||
Failed = 2;
|
Unauthorized = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
required ScavengeResult result = 1;
|
required ScavengeResult result = 1;
|
||||||
optional string error = 2;
|
optional string scavengeId = 2;
|
||||||
required int32 total_time_ms = 3;
|
|
||||||
required int64 total_space_saved = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message IdentifyClient {
|
message IdentifyClient {
|
||||||
|
|
|
@ -55,7 +55,7 @@ function setUpWithGossipSeeds(cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setUpWithDns(cb) {
|
function setUpWithDns(cb) {
|
||||||
var clusterDns = 'discover://eventstore.local:2113';
|
var clusterDns = 'discover://' + process.env.EVENTSTORE_HOST + ':2113';
|
||||||
this.log = settings.log;
|
this.log = settings.log;
|
||||||
this.testStreamName = 'test-' + uuid.v4();
|
this.testStreamName = 'test-' + uuid.v4();
|
||||||
var connected = false;
|
var connected = false;
|
||||||
|
|
|
@ -62,7 +62,7 @@ switch(evenstStoreType){
|
||||||
case 'dns':
|
case 'dns':
|
||||||
module.exports['Connect to Cluster using dns discover'] = function (test) {
|
module.exports['Connect to Cluster using dns discover'] = function (test) {
|
||||||
test.expect(1);
|
test.expect(1);
|
||||||
var clusterDns = 'discover://eventstore.local:2113';
|
var clusterDns = 'discover://' + process.env.EVENTSTORE_HOST + ':2113';
|
||||||
var conn = client.EventStoreConnection.create(testBase.settings(), clusterDns);
|
var conn = client.EventStoreConnection.create(testBase.settings(), clusterDns);
|
||||||
conn.connect()
|
conn.connect()
|
||||||
.catch(function(err) {
|
.catch(function(err) {
|
||||||
|
@ -83,7 +83,7 @@ switch(evenstStoreType){
|
||||||
|
|
||||||
module.exports['Connect To Cluster with bad dns discover'] = function (test) {
|
module.exports['Connect To Cluster with bad dns discover'] = function (test) {
|
||||||
test.expect(3);
|
test.expect(3);
|
||||||
var clusterDns = 'discover://eventstore-bad.local:2113';
|
var clusterDns = 'discover://abc.def.com:2113';
|
||||||
var conn = client.EventStoreConnection.create(testBase.settings({maxDiscoverAttempts: 1}), clusterDns);
|
var conn = client.EventStoreConnection.create(testBase.settings({maxDiscoverAttempts: 1}), clusterDns);
|
||||||
conn.connect()
|
conn.connect()
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
|
@ -91,6 +91,7 @@ switch(evenstStoreType){
|
||||||
});
|
});
|
||||||
conn.on('connected', function () {
|
conn.on('connected', function () {
|
||||||
test.ok(false, 'Should not be able to connect.');
|
test.ok(false, 'Should not be able to connect.');
|
||||||
|
conn.close();
|
||||||
});
|
});
|
||||||
conn.on('error', function (err) {
|
conn.on('error', function (err) {
|
||||||
test.ok(err.message.indexOf('Failed to discover candidate in 1 attempts') === 0, 'Wrong expected reason.');
|
test.ok(err.message.indexOf('Failed to discover candidate in 1 attempts') === 0, 'Wrong expected reason.');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user