mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Compare commits
106 Commits
@grpc/prot
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec819242f6 | ||
|
|
0bce450ae7 | ||
|
|
8e688814fd | ||
|
|
144c2db020 | ||
|
|
276321de66 | ||
|
|
51b8020cdb | ||
|
|
2901922ab1 | ||
|
|
dac1da47a8 | ||
|
|
dbb6eb5254 | ||
|
|
1c97fa5b89 | ||
|
|
a432dbdcee | ||
|
|
67154af9c9 | ||
|
|
82ee40c3c0 | ||
|
|
272851e9f0 | ||
|
|
42677498b3 | ||
|
|
1314e67d16 | ||
|
|
f0bbde1703 | ||
|
|
3950a1c97d | ||
|
|
6e36a6961f | ||
|
|
f2d1776b74 | ||
|
|
a7dfb681b1 | ||
|
|
296bd2fb6f | ||
|
|
cbece4238b | ||
|
|
196ceaadb2 | ||
|
|
5ceac29f3a | ||
|
|
9d601da651 | ||
|
|
c67f7183b2 | ||
|
|
1ec5996769 | ||
|
|
f957004b07 | ||
|
|
2121631243 | ||
|
|
479fa71321 | ||
|
|
202648b334 | ||
|
|
211be0f3c2 | ||
|
|
e975b856b9 | ||
|
|
f0d3f81fec | ||
|
|
1aaa3fde33 | ||
|
|
2f74b88616 | ||
|
|
e78322f717 | ||
|
|
13065ad5a1 | ||
|
|
6573a0ebe4 | ||
|
|
a8d22dc906 | ||
|
|
c7c6ae5b67 | ||
|
|
a081158cbd | ||
|
|
83ece61c88 | ||
|
|
f6571a15c9 | ||
|
|
2fb705e54a | ||
|
|
c1b3eb050d | ||
|
|
73c5e7af12 | ||
|
|
4799bdebed | ||
|
|
0e44501d88 | ||
|
|
4645bfb6ed | ||
|
|
2ea58f5c25 | ||
|
|
aaeac16c5f | ||
|
|
4b160d1664 | ||
|
|
f6981bb329 | ||
|
|
1f93bdffa7 | ||
|
|
ede914ddbf | ||
|
|
7e82de7770 | ||
|
|
f8e93606b2 | ||
|
|
78999ac16d | ||
|
|
eaa3f4d2bf | ||
|
|
259f5c9c86 | ||
|
|
edadc63e6a | ||
|
|
1219c46815 | ||
|
|
7360726e87 | ||
|
|
66f51d1cd2 | ||
|
|
b2007975a1 | ||
|
|
ba52c1b9d7 | ||
|
|
4eb481619f | ||
|
|
9e2b9d03b4 | ||
|
|
fbf7b551e5 | ||
|
|
01db2bc620 | ||
|
|
869e515ea8 | ||
|
|
7fda577ed0 | ||
|
|
b88d545a62 | ||
|
|
63a15e6200 | ||
|
|
d9c8ac3327 | ||
|
|
4a7b0750ef | ||
|
|
0e09b9cd59 | ||
|
|
b69bcad1bb | ||
|
|
aeb7a5fd52 | ||
|
|
d872278606 | ||
|
|
f8a801bcbe | ||
|
|
7729fb7d89 | ||
|
|
50759b5d74 | ||
|
|
a89238d957 | ||
|
|
d6e43e9ac8 | ||
|
|
a1aff9d1bc | ||
|
|
863a81a68e | ||
|
|
75a96ecbae | ||
|
|
07486d89c1 | ||
|
|
6f916c9a9e | ||
|
|
482006e286 | ||
|
|
6168fe8197 | ||
|
|
9652680c5a | ||
|
|
bdcbdf4232 | ||
|
|
b93778607c | ||
|
|
2bb7eae3c9 | ||
|
|
318c800331 | ||
|
|
97b490add8 | ||
|
|
26d26d7b0a | ||
|
|
18fddad85e | ||
|
|
5572bbd432 | ||
|
|
bd3bbe1294 | ||
|
|
02b7c27e96 | ||
|
|
a188ae1681 |
6
examples/data/x509/README.md
Normal file
6
examples/data/x509/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
This directory contains x509 certificates and associated private keys used in
|
||||
examples.
|
||||
|
||||
How were these test certs/keys generated ?
|
||||
------------------------------------------
|
||||
Run `./create.sh`
|
||||
35
examples/data/x509/ca_cert.pem
Normal file
35
examples/data/x509/ca_cert.pem
Normal file
@ -0,0 +1,35 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGAjCCA+qgAwIBAgIUIPV2ERZ/WS8Fl2Ab+ZPlT/iNSfUwDQYJKoZIhvcNAQEL
|
||||
BQAwUDELMAkGA1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yInCOYbJHFpMA6ceSUdBTFM
|
||||
QBn8XBLE
|
||||
-----END CERTIFICATE-----
|
||||
52
examples/data/x509/ca_key.pem
Normal file
52
examples/data/x509/ca_key.pem
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQDIEb49oKeKtNUB
|
||||
1SG22YY9xLHFaSer6/l4dzk2LKpvzz1EfTbWUI5jGfz/C++EEX37Za0l5AOtbQhq
|
||||
lGXodx3MNDik7ATtAsLV9jogCvqJzPWLkAwMnE2O9YHE7QVGC2GoUzhrAxg7wyJn
|
||||
kWrHSoBBzWI6V+q92RZh5kEXg4/b7zUbqBqfqxai27+jXpk+jY28U+5j6jQs0ibc
|
||||
mLfe6DJ9eMDfHThCoHzr95hBH3fjEdTT8m7lOf4BPflRyxkXMm4elXfuoAO3dKD5
|
||||
HIORj8l2hCaXN43ou6d3zhka8mTRNzktI/BhstAL2lTmV5DGajqmHcd20Ap1kr67
|
||||
akaq3Z7j9ePaxFPZRE7NYwfcMgIAQtJu6FqhPIe1nsQncjiKY9aSLjZoEW6WSW4R
|
||||
ZTWRXi4AVybjjcM0VG5OoykzxdGY6pvRQjPMYPkgkXiJrndAuGipHR07n4+cyc/m
|
||||
l+3XsNxedDx7WY3MynQlc1DQapIDT2aj1Jph2jLYQKnndslyP3r8RryAFSJhP4Vf
|
||||
ZmYHJJKkaHXn8x+CfjQlZUSTLAxuHcbxNihA1S/bZxd5cG91mq3DEUikjhDl9B3B
|
||||
LK8dxYgfUNtU7Jwo3cVVnrufvahYDZMcqalKmhRYTS/DrU+yDLH5ZVuxweh835uB
|
||||
0AnvveeVtt2gUwb6IvDgC/qyxpvuXwIDAQABAoIB/z6nIYYLwURdWEzMJyR2D+qE
|
||||
c1WTJyhlBR4TTB12wj4WI0BvjWJigGjKJiQ0nGSsAALTpjN25p7AGhhdcD+Qh4uZ
|
||||
k/g/8rEzluFiy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tumv1YP/RFkZgjp
|
||||
kQKCAQAkocVT/fzx7pqCD8Sbqj8UmwonWY1gAXjtVMEbShIsvd6tC17Zt8zaASF0
|
||||
9MTPOxj9a9wHRZMIKJyJSCfxy0iAPxBbPsIzmbrWdSjrd8MHY0Yo/C81g16tQLvd
|
||||
jk2Q/Stbz+pFD79KZs/euS+4CTuLAEw5dVm5URitc3HKFJND4rRHx0t6XOqIGUdu
|
||||
1VCiCLQEUntAAn89TDDQ61uW8hmVSnjRMmkgkeu0vtjCBa4wilayALjApY4p04Cy
|
||||
wiLKmDQf8R0DvzqK/Gqk1CMtTbvcMQwbH8wwTvSXYCBj3rg5hNVAf2ddIzY9mVRl
|
||||
rjzlPgeLBZae1+7UCXeioQniof5q
|
||||
-----END PRIVATE KEY-----
|
||||
35
examples/data/x509/client_ca_cert.pem
Normal file
35
examples/data/x509/client_ca_cert.pem
Normal file
@ -0,0 +1,35 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGAjCCA+qgAwIBAgIURGfUPy0ORjQXQL1XjhKGh9t9CEUwDQYJKoZIhvcNAQEL
|
||||
BQAwUDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQwwCgYDVQQHDANTVkwxDTAL
|
||||
BgNVBAoMBGdSUEMxFzAVBgNVBAMMDnRlc3QtY2xpZW50X2NhMB4XDTI1MDkxNzE3
|
||||
MDkwNFoXDTM1MDkxNTE3MDkwNFowUDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNB
|
||||
MQwwCgYDVQQHDANTVkwxDTALBgNVBAoMBGdSUEMxFzAVBgNVBAMMDnRlc3QtY2xp
|
||||
ZW50X2NhMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwh9DwaR9Eyuq
|
||||
9V706Hgthxmm19Sh1Pxet5I+cZ3CRclgt2hwHEbuSs+R/Vbwq+OyiCv18LXgOzfS
|
||||
VPP+xgklxSeRTT5hvplC08g+BvLwC6TVaeaQiDDfft5uVt2X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XoLU44dY
|
||||
FPmsV+y/2El4IlKh8HUr2VO7VJX2Ev6lWnsotTnsNoQMCSvJBdBWTZwfEpsnNoiB
|
||||
iLOcZaD9tdNzwzBc+bkqJ0x812KmLbxaPboM6HFH6ObEnK0IkrhuoPTnuvMilie5
|
||||
LOjO2vVgdkznUtKzKD8JoPb1oT8voqmMlXhT8cwMrXi2Kbh7k1Iur16ak9vPI0Ua
|
||||
DqIwlni8cpCWuHZYNrwHVdQREgUC+pvsrkNE4g/tHMGXhkg/p4RszmQ2RAt5f17g
|
||||
iPZ1G+unoCLkQyNJ/Ghtv7iaZyrzQ0b9Ib9MERkxu6DYRPjgKe3oWRRXVzxqg9uz
|
||||
45dauNEpHBfArrcT0cNm2bm6xCTWoZJL1Pb8GJHJ8/0j4JmdyYEjsDloI8+QL4CO
|
||||
Hs656/zGNLBRj0idR3Nq9OmbW1bgQwmblTiyTL2iAb01u0O64avmIQDZDiWblqvk
|
||||
qZcnt6/6wK/2SMDwrb/trjKKIGyz8mlmRA+kZF97oBhlfEDpwBEilv0UR+nQdvEE
|
||||
rjgaxZkaPodMXRvi8v+TPn5QdjxW83iB3LSFlsGb/oBFBDXjmmqg+TUdktmH9P4S
|
||||
x+6k0BbS
|
||||
-----END CERTIFICATE-----
|
||||
52
examples/data/x509/client_ca_key.pem
Normal file
52
examples/data/x509/client_ca_key.pem
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDCH0PBpH0TK6r1
|
||||
XvToeC2HGabX1KHU/F63kj5xncJFyWC3aHAcRu5Kz5H9VvCr47KIK/XwteA7N9JU
|
||||
8/7GCSXFJ5FNPmG+mULTyD4G8vALpNVp5pCIMN9+3m5W3ZdSNnfnDMT+CshL55Z6
|
||||
Puiwz2HolndANMtSLdXBTTYYgwLoYxrjaDLVCizPmiWfV7erMA+4Isdx7VwWD1Zk
|
||||
5UNwnTdtA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H+Pr
|
||||
gW/xJ9CNP7hUIlkGJSUMPQChN67o1QNO1l68HyAeArhu2oxI3blhHP5oNgyUFyyQ
|
||||
pfLFfI3RMVGtTrcavGPJuFeh/Sogc1cszd4AhIFZB+PTKAXd5myEoyhErI+q7zvC
|
||||
U2TuTdQUU5LfcILEBhwdAqTHNZ1NEwLKcY+bHphHoYtmhPy9IfHO6NGqKoGYa2eI
|
||||
M4MIBgpDtGTOq8qCPUneKe22adaYz8e1RvqlsRkCggEAU+8opZbtT9SVVTq70ks8
|
||||
6wyQR6t1XgF0/4q8XUDamxlG3vEerMSx7susPBvtAl0T4+wPMiF7ZWC359zMAny9
|
||||
l9J0Ii1SdrMOHmj3olXwxUeZbQ/eJLn5Dkp+xSDWSK7qJnHqUjddEyPh9Ok/I4dw
|
||||
1MBG7GRMEZS1qJXSvqMWztrm2wu6gEnDGURCi0GanJOLXvz1f3oJcS3r3QdCTDGF
|
||||
JkAit+aIBkUhc5v/6mx0fuK1YahZXxQAD/M08OZXVo68HopeYSfHmg8qIow/2JJC
|
||||
r0Gys6U5QYY5yqHbfLElALlw+ttdM/WVfOFzMpp6Inmed7FaHHfbJkH2q4C05Rzk
|
||||
RwKCAQEAgdErs3lLSdgC2dSu4BtrVww7S9raDsUVG0UHGd5b34UhaovJwuwV50l1
|
||||
VIVyqLbObfij04j/Xx8WcRjNA5jkhS3GlzaD9Jt3ZXbxh+neXXlRi71OhFhS4hFk
|
||||
yE7f+u9lZjfmrWALbSYHAYZ0EXccZ87GXnx10ZurUYCvGPQL2yeLjswKkzLFbqrk
|
||||
MRymUse9r9nG5QFYY7lF+MCwN7uxlCEg6CEHR7g1slJuNjVdXrorKdQy/cPGWlc3
|
||||
OUQ4+iW8M8dOWapQt1Njz6ilCVUEaQnhiSX5/sK63Flmmbi1g4CWq5TgGnUf4NKg
|
||||
qexnJsLQLNgIy+am0ldF2ZffQgZI7w==
|
||||
-----END PRIVATE KEY-----
|
||||
32
examples/data/x509/client_cert.pem
Normal file
32
examples/data/x509/client_cert.pem
Normal file
@ -0,0 +1,32 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFkjCCA3qgAwIBAgICA+gwDQYJKoZIhvcNAQELBQAwUDELMAkGA1UEBhMCVVMx
|
||||
CzAJBgNVBAgMAkNBMQwwCgYDVQQHDANTVkwxDTALBgNVBAoMBGdSUEMxFzAVBgNV
|
||||
BAMMDnRlc3QtY2xpZW50X2NhMB4XDTI1MDkxNzE3MDkwNVoXDTM1MDkxNTE3MDkw
|
||||
NVowTjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQwwCgYDVQQHDANTVkwxDTAL
|
||||
BgNVBAoMBGdSUEMxFTATBgNVBAMMDHRlc3QtY2xpZW50MTCCAiIwDQYJKoZIhvcN
|
||||
AQEBBQADggIPADCCAgoCggIBAPikucha+hzH8Ggx6PVIzHnG0Oo6aOyDzvZr6jy4
|
||||
jofYEsyo7iyXgYovATtSsJ6WfL18LEotk+8F/uHjKbmaEFPlBtx3k5I5MMGeWuR5
|
||||
b1rFqcVV4PjYJ7Nrw4XFTUgDEYjnq/mG54q1yc07/WoOQF0GBnffdBfJNk/89XdN
|
||||
JRTKs383eVjrReR3vOFzL8wEw3G4fG8TDLf69wCCotGgZmcBqcsQGrVi5NWiYgyN
|
||||
Gy5oHy28s4Og9gaMFZPIlOnPAVR3Z4CAIvwK9KwhYG/CXpB15SkQ4htZ2dUaumFy
|
||||
tK9KPUGLp/4rQNy+5GNPzvY4dL0Yh4txcMH+DJFQamJU0RpNGe0JEIkgQy4nBuKh
|
||||
19jP3+lV/6relvJxqgcp69oHlYaeSfoyMMzaPvfWIA/KPyQO/HUTwytVM1hmVVZD
|
||||
YB3knM37dy6Q2m5htA8+QJ8eOnq/7QZy3Z7SekCZblATv+SghjDxT6idWsfpLMxS
|
||||
qO2E3UxxVYtbSjdAYsbXV+MxaUkUckSOiq5zYXvUjcopQ+Bfpn0bA6aUSonqtJl1
|
||||
jbBf19thQD2kJFrYUBgy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WLPMLBfkf4GVC5xE=
|
||||
-----END CERTIFICATE-----
|
||||
52
examples/data/x509/client_key.pem
Normal file
52
examples/data/x509/client_key.pem
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQD4pLnIWvocx/Bo
|
||||
Mej1SMx5xtDqOmjsg872a+o8uI6H2BLMqO4sl4GKLwE7UrCelny9fCxKLZPvBf7h
|
||||
4ym5mhBT5Qbcd5OSOTDBnlrkeW9axanFVeD42Ceza8OFxU1IAxGI56v5hueKtcnN
|
||||
O/1qDkBdBgZ333QXyTZP/PV3TSUUyrN/N3lY60Xkd7zhcy/MBMNxuHxvEwy3+vcA
|
||||
gqLRoGZnAanLEBq1YuTVomIMjRsuaB8tvLODoPYGjBWTyJTpzwFUd2eAgCL8CvSs
|
||||
IWBvwl6QdeUpEOIbWdnVGrphcrSvSj1Bi6f+K0DcvuRjT872OHS9GIeLcXDB/gyR
|
||||
UGpiVNEaTRntCRCJIEMuJwbiodfYz9/pVf+q3pbycaoHKevaB5WGnkn6MjDM2j73
|
||||
1iAPyj8kDvx1E8MrVTNYZlVWQ2Ad5JzN+3cukNpuYbQPPkCfHjp6v+0Gct2e0npA
|
||||
mW5QE7/koIYw8U+onVrH6SzMUqjthN1McVWLW0o3QGLG11fjMWlJFHJEjoquc2F7
|
||||
1I3KKUPgX6Z9GwOmlEqJ6rSZdY2wX9fbYUA9pCRa2FAYMmIyzZwOKG0n6iUSDoZT
|
||||
B1lKEIOeUuJr6oNhvonOSNjVmoPsOew5h4+csFeMEpO3fNQi2B5E5CNIUhkV7ZUo
|
||||
RGanB65gGAuWTGSwXADZB5JP920PvQIDAQABAoICADrTNgT5ySyf/PeZv0SwuXei
|
||||
GvEfao1yTbetJljBTS9EZoY2/Updec9IeaEgWhra/Z4Sz6OpDtPA9mFYzhlUIsLG
|
||||
b44fWDGDCE72eQiO1lKCazz9qWEWOq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Eh8s2tpDghBgmunMy
|
||||
w3ECggEBANd6XGIMmB0pmdinVU7gBsXlMYcnQEdtJWcMeJKRaZjhrmnSEQGfl5se
|
||||
U9AGGxaVZg32+q7/AXEY2p0RRYDpG1mAYFisa2hglrsBU1hkQWHZ7xdHBKgQOgCG
|
||||
wMOO5hZH94uyF2PPh5YG6XvZCudEfdkFNNlU3yFepG3/lNHXh4bEGOJvLSz/77XW
|
||||
gshQRyggqDJ2B9K/iobO4wg0f2U/MmX3VOljwPxrp74M2JJkplmrCJ6JNbD7dFo9
|
||||
+bW6K7QplpsPAfYQMV3oOeitgtu5RycR/ADW4sIZw2JBa/2T3JNIgsgyG/Wz9SAR
|
||||
DC5I2TQD/DsjdPJFAk94MNL1SxrgOu4=
|
||||
-----END PRIVATE KEY-----
|
||||
69
examples/data/x509/create.sh
Executable file
69
examples/data/x509/create.sh
Executable file
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create the server CA certs.
|
||||
openssl req -x509 \
|
||||
-newkey rsa:4096 \
|
||||
-nodes \
|
||||
-days 3650 \
|
||||
-keyout ca_key.pem \
|
||||
-out ca_cert.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-server_ca/ \
|
||||
-config ./openssl.cnf \
|
||||
-extensions test_ca \
|
||||
-sha256
|
||||
|
||||
# Create the client CA certs.
|
||||
openssl req -x509 \
|
||||
-newkey rsa:4096 \
|
||||
-nodes \
|
||||
-days 3650 \
|
||||
-keyout client_ca_key.pem \
|
||||
-out client_ca_cert.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-client_ca/ \
|
||||
-config ./openssl.cnf \
|
||||
-extensions test_ca \
|
||||
-sha256
|
||||
|
||||
# Generate a server cert.
|
||||
openssl genrsa -out server_key.pem 4096
|
||||
openssl req -new \
|
||||
-key server_key.pem \
|
||||
-days 3650 \
|
||||
-out server_csr.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-server1/ \
|
||||
-config ./openssl.cnf \
|
||||
-reqexts test_server
|
||||
openssl x509 -req \
|
||||
-in server_csr.pem \
|
||||
-CAkey ca_key.pem \
|
||||
-CA ca_cert.pem \
|
||||
-days 3650 \
|
||||
-set_serial 1000 \
|
||||
-out server_cert.pem \
|
||||
-extfile ./openssl.cnf \
|
||||
-extensions test_server \
|
||||
-sha256
|
||||
openssl verify -verbose -CAfile ca_cert.pem server_cert.pem
|
||||
|
||||
# Generate a client cert.
|
||||
openssl genrsa -out client_key.pem 4096
|
||||
openssl req -new \
|
||||
-key client_key.pem \
|
||||
-days 3650 \
|
||||
-out client_csr.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-client1/ \
|
||||
-config ./openssl.cnf \
|
||||
-reqexts test_client
|
||||
openssl x509 -req \
|
||||
-in client_csr.pem \
|
||||
-CAkey client_ca_key.pem \
|
||||
-CA client_ca_cert.pem \
|
||||
-days 3650 \
|
||||
-set_serial 1000 \
|
||||
-out client_cert.pem \
|
||||
-extfile ./openssl.cnf \
|
||||
-extensions test_client \
|
||||
-sha256
|
||||
openssl verify -verbose -CAfile client_ca_cert.pem client_cert.pem
|
||||
|
||||
rm *_csr.pem
|
||||
28
examples/data/x509/openssl.cnf
Normal file
28
examples/data/x509/openssl.cnf
Normal file
@ -0,0 +1,28 @@
|
||||
[req]
|
||||
distinguished_name = req_distinguished_name
|
||||
attributes = req_attributes
|
||||
|
||||
[req_distinguished_name]
|
||||
|
||||
[req_attributes]
|
||||
|
||||
[test_ca]
|
||||
basicConstraints = critical,CA:TRUE
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid:always,issuer:always
|
||||
keyUsage = critical,keyCertSign
|
||||
|
||||
[test_server]
|
||||
basicConstraints = critical,CA:FALSE
|
||||
subjectKeyIdentifier = hash
|
||||
keyUsage = critical,digitalSignature,keyEncipherment,keyAgreement
|
||||
subjectAltName = @server_alt_names
|
||||
|
||||
[server_alt_names]
|
||||
DNS.1 = *.test.example.com
|
||||
|
||||
[test_client]
|
||||
basicConstraints = critical,CA:FALSE
|
||||
subjectKeyIdentifier = hash
|
||||
keyUsage = critical,nonRepudiation,digitalSignature,keyEncipherment
|
||||
extendedKeyUsage = critical,clientAuth
|
||||
32
examples/data/x509/server_cert.pem
Normal file
32
examples/data/x509/server_cert.pem
Normal file
@ -0,0 +1,32 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFmTCCA4GgAwIBAgICA+gwDQYJKoZIhvcNAQELBQAwUDELMAkGA1UEBhMCVVMx
|
||||
CzAJBgNVBAgMAkNBMQwwCgYDVQQHDANTVkwxDTALBgNVBAoMBGdSUEMxFzAVBgNV
|
||||
BAMMDnRlc3Qtc2VydmVyX2NhMB4XDTI1MDkxNzE3MDkwNVoXDTM1MDkxNTE3MDkw
|
||||
NVowTjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQwwCgYDVQQHDANTVkwxDTAL
|
||||
BgNVBAoMBGdSUEMxFTATBgNVBAMMDHRlc3Qtc2VydmVyMTCCAiIwDQYJKoZIhvcN
|
||||
AQEBBQADggIPADCCAgoCggIBAJKa94AjQ+jMqv4RdMjogvrqb8y4NMoFPHb/A/Eo
|
||||
0ahQsLu8enexiCAHq3QenIIvSp6KxvL5ERoYfsv1c9jG5B4/Z7wD1Tkut7bOiAG1
|
||||
cO3sgkz6+ttSWYDomBxHw19h2qJl/XIIgz4FO84tBMJIU2lXQejRd6a+/rKyvk5e
|
||||
IZIeBf82ujO1I/9O04rNkZGHRhX/AoGmF5LuUAoex2yWU5/8V2y7svJb0+AOOJH9
|
||||
tCW/mEVwb/5Gz3iD04cqhJKDtwMXYIa41BnkgQfr+AsGE0H2sdlYmCDVp/DbLMOU
|
||||
pqjWuCzYA37ef4mGTH20eFbIoaZ7lVDxY8S0jV5DH+nsrj74keBG4azj2SL7rf/H
|
||||
bniycFukSx+GFRAWpxTPD8vp4TGpV1qFyef3IANAPSlrhIwFfAPz8mUnHW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h+rpIsGu3csGCGHFmWaD2vBWrSLMrx6gmhbqUUIgHNQYpelDV024wiLj2
|
||||
BS/zTQUNWFZgkuzHnAF1abHvFHCd12+AeVBV1NZoDgjcPokJGDWVeqHWbJwsquy1
|
||||
sqP79Pup+LHd32yCIEZZlMb8M3o08aqemoqjVcVb57puKNyfwk8sT5tBq9Hv
|
||||
-----END CERTIFICATE-----
|
||||
52
examples/data/x509/server_key.pem
Normal file
52
examples/data/x509/server_key.pem
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCSmveAI0PozKr+
|
||||
EXTI6IL66m/MuDTKBTx2/wPxKNGoULC7vHp3sYggB6t0HpyCL0qeisby+REaGH7L
|
||||
9XPYxuQeP2e8A9U5Lre2zogBtXDt7IJM+vrbUlmA6JgcR8NfYdqiZf1yCIM+BTvO
|
||||
LQTCSFNpV0Ho0Xemvv6ysr5OXiGSHgX/NroztSP/TtOKzZGRh0YV/wKBpheS7lAK
|
||||
HsdsllOf/Fdsu7LyW9PgDjiR/bQlv5hFcG/+Rs94g9OHKoSSg7cDF2CGuNQZ5IEH
|
||||
6/gLBhNB9rHZWJgg1afw2yzDlKao1rgs2AN+3n+Jhkx9tHhWyKGme5VQ8WPEtI1e
|
||||
Qx/p7K4++JHgRuGs49ki+63/x254snBbpEsfhhUQFqcUzw/L6eExqVdahcnn9yAD
|
||||
QD0pa4SMBXwD8/JlJx1hNZ+sG4Frdq7YBrvGm2zhelNBdmkRlDx944o1CCQ+jK93
|
||||
MvLJZEWdcPJ79p8TLKZyXKUd1bTfjJJustKOJUxc7GL40TzVjSzUTgOJnfnE4H4U
|
||||
jilc7GBl1KkQzZ9zRjj4GM1w0gsNAFyB5WhoFS2993p5FNur1nZDR0dUZpUqVnNO
|
||||
4wrwbr6Bf5c/xQfvGNMDXmQIL7Vr+jQsGgVhZDBtkrYhhcHjnbM5PnMMgmhl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RL1Sd7NdS6kjVQh5qQS4OCMulRZ8w
|
||||
TfLtPl0AhPqxFmaJlJwK+kFqya5iAqvNbYhv5+iILtEm1zPGGyn8ANFyRDuUuJsm
|
||||
gvxEDcfohmgGu5LAtBYLpap1Mx3Je0bwVky2kx5I/6m3sv0OF+SRN86akQSwUC75
|
||||
iQKCAQEAp2OlklCIQjyp4z7Amqyh5YZm0XrXPn09ihxnAqn2Ie5zb8BVSnoNYDpl
|
||||
dsZQLPOLrDAU/haAl9RNIibravCh+zMEZ12t+PD33TWWRxqQ/Di6biNfYzDGv/Y4
|
||||
MhGWF7RXeUobU9ShI/jyfWMVOa2Zg5YcAVFlHNbqfy7uMREovvSFXCG2Mmq1RZ4Y
|
||||
s1rWh7ZsfbXbF5mFoqlK4CaASdicsxOaoSy+yhXJLvg95O/wftyaboTqbRq165Ae
|
||||
sPBsgNq5oOulS0d+CO53+V0mRYLWBZpuPTdk9qierTuERklGbLGTdeQpDvZLeB/U
|
||||
dqcVC951MqK11/LGybm+ojj5JFsbog==
|
||||
-----END PRIVATE KEY-----
|
||||
6
examples/data/x509/x509/README.md
Normal file
6
examples/data/x509/x509/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
This directory contains x509 certificates and associated private keys used in
|
||||
examples.
|
||||
|
||||
How were these test certs/keys generated ?
|
||||
------------------------------------------
|
||||
Run `./create.sh`
|
||||
34
examples/data/x509/x509/ca_cert.pem
Normal file
34
examples/data/x509/x509/ca_cert.pem
Normal file
@ -0,0 +1,34 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF6jCCA9KgAwIBAgIJANQvyb7tgLDkMA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNV
|
||||
BAYTAlVTMQswCQYDVQQIDAJDQTEMMAoGA1UEBwwDU1ZMMQ0wCwYDVQQKDARnUlBD
|
||||
MRcwFQYDVQQDDA50ZXN0LXNlcnZlcl9jYTAeFw0yMjAzMTgyMTQ0NTZaFw0zMjAz
|
||||
MTUyMTQ0NT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oVSkUjBQMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExDDAKBgNV
|
||||
BAcMA1NWTDENMAsGA1UECgwEZ1JQQzEXMBUGA1UEAwwOdGVzdC1zZXJ2ZXJfY2GC
|
||||
CQDUL8m+7YCw5DAOBgNVHQ8BAf8EBAMCAgQwDQYJKoZIhvcNAQELBQADggIBAKTh
|
||||
Ofg4WospSN7Gg/q3bQqfSMT5XTFC7cj0j3cWDZBnmqb0HAFPmzHT+w3kBVNCyx1r
|
||||
iatOhaZRH7RA0vacZQT5pD2MGU48/zFfwBV/qHENQWuRLD2WOOEU3cjjoINBclfP
|
||||
im7ml/xgz0ACOgUyf+/2hkS7VLq4p9QQVGf2TQt65DZA9mUylZTdsBf4AfEg7IXv
|
||||
gaYpq6tYmNi7fXDzR/LT+fPd4ejQARy9U7uVhecyH9zTUMzm2Fr/p7HhydSXNwhF
|
||||
JUfPWw7XYO0lyA+8PxUSAKXOfsT44WNtHAeRm/Gkmn8inBdedFia/+M67k45b/wY
|
||||
RF11QzvaMR33jmrdZWxCc0Xjg8oZIP7T9MfGFULEGCpB3NY4YjnRrid/JZ/edhPR
|
||||
2iOiEiek4qAaxeIne3CR2dqCM+n+FV1zCs4n3S0os4+kknnS5aNR5wZpqpZfG0Co
|
||||
FyWE+dE51cGcub1wT1oi5Xrxg/iRteCfd33Ky668FYKA/tHHdqkVfBflATU6iOtw
|
||||
dIzvFJk1H1mUwpJrH/aNOHzVCQ5KSpcc+kXcOQPafTHFB6zMVJ6O+Vm7SrqiSENM
|
||||
2b1fBKxHIsxOtwrKuzbRhU5+eAICqwMd6gcIpT/JSR1r+UfHVcrXalbeazmT2DS5
|
||||
CFOeinj4WQvtPYOdbYsWg8Y9zGN4L9zH6GovM1wD
|
||||
-----END CERTIFICATE-----
|
||||
52
examples/data/x509/x509/ca_key.pem
Normal file
52
examples/data/x509/x509/ca_key.pem
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
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0iIZtH4
|
||||
BlGncnAbzb6TJuLX7dNwICoUCGyvk9tdnThH1FY3ZAEhOi1G8LEh7aBrj9/vUZ2d
|
||||
S5jzZ7kLh04AB8OP1MXM3sZE7VlIxUtT/NLlwC8zRsg84pAjg3U7PygIDYQDzCRB
|
||||
4yIvDziTPqDB/vdCKt7/Xary5Xj4NwqcPCRf6HvdHYCVeW7V+mWcMKZgodQARQhv
|
||||
qQCK9iiN08MAFNia/0/Bj4D7XKurNRY=
|
||||
-----END PRIVATE KEY-----
|
||||
34
examples/data/x509/x509/client_ca_cert.pem
Normal file
34
examples/data/x509/x509/client_ca_cert.pem
Normal file
@ -0,0 +1,34 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF6jCCA9KgAwIBAgIJAOhoXtjjP6JdMA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNV
|
||||
BAYTAlVTMQswCQYDVQQIDAJDQTEMMAoGA1UEBwwDU1ZMMQ0wCwYDVQQKDARnUlBD
|
||||
MRcwFQYDVQQDDA50ZXN0LWNsaWVudF9jYTAeFw0yMjAzMTgyMTQ0NThaFw0zMjAz
|
||||
MTUyMTQ0NThaMFAxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEMMAoGA1UEBwwD
|
||||
U1ZMMQ0wCwYDVQQKDARnUlBDMRcwFQYDVQQDDA50ZXN0LWNsaWVudF9jYTCCAiIw
|
||||
DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAO7fTqeU+8OfKMwXABNF90+RYL4X
|
||||
YS4ULx4rpf14Ntp1SF6o3itCSM3jJfHzexj2Pm16aL+OQll8ODtvTadqVSMndMCn
|
||||
UN/jVjxiMmjkSNKpwUGG69CsQzCKoueKBCEy/CZSopQae6Wxn7mqTAzhFlh3idNL
|
||||
J+12UtdqDxnPDsiG2XBET3UrKyJeBxMgRyPi/g4wHfhH9oJ97jkdacUlLko8l22s
|
||||
ZiMSSwwOlWxtTY5t0FbHu08ufP4eYTqC0LL3z1Fon4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1QcWMrW3jUI8npi
|
||||
Q9rXRwrqUYP7Yzz+dIziGdpOfZd7x/MyCXuqRdFdA+bulGM2Es5lvtguPOFhcWp0
|
||||
3hzLJ+yolxyqxnNNdaU0r+TDbgxOBjw0VxahuhzFDeZsP6Civzp+Y6MRdvofNXBm
|
||||
IBD4uqmQtUUyE2uoznXvZkXaSc+0VIGgs04AMS9irBC2oVEGDp0AbelcIhdgToam
|
||||
/NTuOmxgadwDuEn3TIFYkzx84J81kL8g0HQ1N09nSXChkSVb+XlxC+Wosxoazydr
|
||||
M4FOvaa1V4vnmIdA2aF1nWTzJNcc9FC23zTmQkV2YJ1IKNmxGd3xBZzUtUBu5OgZ
|
||||
vPXECtUjRcraNuXeL6gSX0qBaaVkcdxhp8CpI8k6Qb+mgOaq/ixrVEKtczBVXjHD
|
||||
pO6QmwMZtqR8JsStbMCYXa2owt4k8F3yMlIKE6qX
|
||||
-----END CERTIFICATE-----
|
||||
52
examples/data/x509/x509/client_ca_key.pem
Normal file
52
examples/data/x509/x509/client_ca_key.pem
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDu306nlPvDnyjM
|
||||
FwATRfdPkWC+F2EuFC8eK6X9eDbadUheqN4rQkjN4yXx83sY9j5temi/jkJZfDg7
|
||||
b02nalUjJ3TAp1Df41Y8YjJo5EjSqcFBhuvQrEMwiqLnigQhMvwmUqKUGnulsZ+5
|
||||
qkwM4RZYd4nTSyftdlLXag8Zzw7IhtlwRE91KysiXgcTIEcj4v4OMB34R/aCfe45
|
||||
HWnFJS5KPJdtrGYjEksMDpVsbU2ObdBWx7tPLnz+HmE6gtCy989RaJ+L/uAalMiu
|
||||
wU93SEsDwZkndbkw+1m2mv0Jn1OmNfHZDZStNBlAHCloD3y3JuxB/wAM+V5KqM1U
|
||||
d8+RSwWBU8VawC8vxruRy8f7sKGFnmEVgTkpKr3YH/T0+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yAnfzwPi8Ma7imsSnPgFSwKh1F2G1GnvQpxQPDgE
|
||||
epQ59XofDR5j0EW7mMXEqtIIn3V6hyI3fkYY795FAoIBAQCsx7x26YsN1krRzA7g
|
||||
TxmiQ8exJ2gsJIcOxqT8l98WTeVqry6kOxuD9R6aLs/YNIZBrbG2vuma+PBFPMS9
|
||||
LLzsPRNCAL4s7l+nWerTmvw2B+8rm/796Fi+dwL2lfOKJipIllj52TdbGDI874Bi
|
||||
Q7PLSxrN0u7eh9pCwvORmY8G4eCI20bkE9+OBmq7JqlSg5ss19RAf8hcR/2pXmOg
|
||||
t45hNLIEqp3OFEF8A26MnjiHdZjN/xidsFEUjwx/U/USIqqJK7Dq9ZjqprYw1rs3
|
||||
Yh1VqMiHeRIDhCU5twt+iCojuILy2G1d+XSOVNsiNIXtaz3EYBMcouUMlV8kVtpa
|
||||
xQPhAoIBAEr8U7ZaAxN2Ptgb6B8M1CVNE6q7S1VuX+T8xkciadW2aRjJ3PufFfsk
|
||||
Zo12fP9K/NeOPTIz0dQB6Gy/CKzDLb8NnJCJnCUUaO8E45C2L9r6qvIJpXWHp3vo
|
||||
neGO49y/5st7suOZkWU2B6ZGwNWH90296mfSKcUNxSRMaHCotPdVDyvOgLC24ZWR
|
||||
6teRaxB2sVZYqmoz+4+G8SOK40bHJKf1kwujbrS3OqzDzEeC/STtqYZWPW03MFkk
|
||||
MBPQvwCWMJINv4zz4YrnOaA9COc1/fTXCG5kKYyalPD8VKxi1usas1pZwIqZkuwm
|
||||
D6kBMuZ4gkKW24IYzXzOni0/BOnpOfM=
|
||||
-----END PRIVATE KEY-----
|
||||
32
examples/data/x509/x509/client_cert.pem
Normal file
32
examples/data/x509/x509/client_cert.pem
Normal file
@ -0,0 +1,32 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFcTCCA1mgAwIBAgICA+gwDQYJKoZIhvcNAQELBQAwUDELMAkGA1UEBhMCVVMx
|
||||
CzAJBgNVBAgMAkNBMQwwCgYDVQQH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ziVm
|
||||
RtulG3f9ROrhMA4GA1UdDwEB/wQEAwIF4DAWBgNVHSUBAf8EDDAKBggrBgEFBQcD
|
||||
AjANBgkqhkiG9w0BAQsFAAOCAgEAtr1dzSQswIOlEGlLtoAwkL7ys/gP2fcdh7Jl
|
||||
ggiPs266yzZFyGGdd2GKo6tcjdBNjfnO8T5h8eLzj7QlzKPqA/l0BgAW7s7WX9QF
|
||||
wCivw1DHE815ujlQNo3yve38pd2/I0hdf9GtQLGyOirYpwW5YcHvpmLezrW6J3UU
|
||||
CWIfYhqO6bSs+HCLkvQdsCG1TpveWYXfC9aXHjw+ZGOjBMEt6AgdWctwzTjQfZub
|
||||
VjZosBC3ZkDjkA9LTqKP5f8XSWt89J4JCYkiFRiJuYYiNYcZpb0Ug93XjEHIHXMG
|
||||
N/cD9fCB2HovoVu8YnezpSrqEhqEikHSq80fwbf+NaT0CEbPMx3UMzt8d8gwUiwE
|
||||
nzzf/o4uOwoofNWfka0J1VPY1AtjUDvz44LyVhp4uvkEJEK1WQ46mM68H/EOUmpd
|
||||
fHANEbV8HLq2iOjR78n5+MCHRcX7duScp5wT0ajfDg41VrhvV/u7YctFj8ynQJg5
|
||||
cqbH+GgTrEfAFFm5mZH1SGqNPyxr1eQFWXMRGE7R/NoyQo2uqrSRmz6JFXlnWtxF
|
||||
YmLhnOdQaytcpiYN2YVyC/rLK3l3Tbh4u5axvlZP/hi+nQluiZzkH97iUqXcBU/9
|
||||
jYNohnJzXMHTIZM8FQY+9uGw9ErdDo7FmX5Xkp4TzEz9k10m1fnt0njSEzITtqpg
|
||||
MoO9n00=
|
||||
-----END CERTIFICATE-----
|
||||
51
examples/data/x509/x509/client_key.pem
Normal file
51
examples/data/x509/x509/client_key.pem
Normal file
@ -0,0 +1,51 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIJKAIBAAKCAgEAvZ5zpr3c5giKh58KzcpHPvnYTlV8k/JW7FqUExzsPHzg2x3C
|
||||
ltTINPp87t49gzw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+Ia8018cfDS
|
||||
KW5PQAEnJC/BZAI7SQsxH0J9M7NYxJRN0bua5Be0N+uuYSOa+d9yecugfmvga6jf
|
||||
9nEcohJShacCSkQvIXlq5Uy/WBb6sbiTmHjjW14FG25B0rrQUjmFAUiYceI=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
69
examples/data/x509/x509/create.sh
Executable file
69
examples/data/x509/x509/create.sh
Executable file
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create the server CA certs.
|
||||
openssl req -x509 \
|
||||
-newkey rsa:4096 \
|
||||
-nodes \
|
||||
-days 3650 \
|
||||
-keyout ca_key.pem \
|
||||
-out ca_cert.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-server_ca/ \
|
||||
-config ./openssl.cnf \
|
||||
-extensions test_ca \
|
||||
-sha256
|
||||
|
||||
# Create the client CA certs.
|
||||
openssl req -x509 \
|
||||
-newkey rsa:4096 \
|
||||
-nodes \
|
||||
-days 3650 \
|
||||
-keyout client_ca_key.pem \
|
||||
-out client_ca_cert.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-client_ca/ \
|
||||
-config ./openssl.cnf \
|
||||
-extensions test_ca \
|
||||
-sha256
|
||||
|
||||
# Generate a server cert.
|
||||
openssl genrsa -out server_key.pem 4096
|
||||
openssl req -new \
|
||||
-key server_key.pem \
|
||||
-days 3650 \
|
||||
-out server_csr.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-server1/ \
|
||||
-config ./openssl.cnf \
|
||||
-reqexts test_server
|
||||
openssl x509 -req \
|
||||
-in server_csr.pem \
|
||||
-CAkey ca_key.pem \
|
||||
-CA ca_cert.pem \
|
||||
-days 3650 \
|
||||
-set_serial 1000 \
|
||||
-out server_cert.pem \
|
||||
-extfile ./openssl.cnf \
|
||||
-extensions test_server \
|
||||
-sha256
|
||||
openssl verify -verbose -CAfile ca_cert.pem server_cert.pem
|
||||
|
||||
# Generate a client cert.
|
||||
openssl genrsa -out client_key.pem 4096
|
||||
openssl req -new \
|
||||
-key client_key.pem \
|
||||
-days 3650 \
|
||||
-out client_csr.pem \
|
||||
-subj /C=US/ST=CA/L=SVL/O=gRPC/CN=test-client1/ \
|
||||
-config ./openssl.cnf \
|
||||
-reqexts test_client
|
||||
openssl x509 -req \
|
||||
-in client_csr.pem \
|
||||
-CAkey client_ca_key.pem \
|
||||
-CA client_ca_cert.pem \
|
||||
-days 3650 \
|
||||
-set_serial 1000 \
|
||||
-out client_cert.pem \
|
||||
-extfile ./openssl.cnf \
|
||||
-extensions test_client \
|
||||
-sha256
|
||||
openssl verify -verbose -CAfile client_ca_cert.pem client_cert.pem
|
||||
|
||||
rm *_csr.pem
|
||||
28
examples/data/x509/x509/openssl.cnf
Normal file
28
examples/data/x509/x509/openssl.cnf
Normal file
@ -0,0 +1,28 @@
|
||||
[req]
|
||||
distinguished_name = req_distinguished_name
|
||||
attributes = req_attributes
|
||||
|
||||
[req_distinguished_name]
|
||||
|
||||
[req_attributes]
|
||||
|
||||
[test_ca]
|
||||
basicConstraints = critical,CA:TRUE
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid:always,issuer:always
|
||||
keyUsage = critical,keyCertSign
|
||||
|
||||
[test_server]
|
||||
basicConstraints = critical,CA:FALSE
|
||||
subjectKeyIdentifier = hash
|
||||
keyUsage = critical,digitalSignature,keyEncipherment,keyAgreement
|
||||
subjectAltName = @server_alt_names
|
||||
|
||||
[server_alt_names]
|
||||
DNS.1 = *.test.example.com
|
||||
|
||||
[test_client]
|
||||
basicConstraints = critical,CA:FALSE
|
||||
subjectKeyIdentifier = hash
|
||||
keyUsage = critical,nonRepudiation,digitalSignature,keyEncipherment
|
||||
extendedKeyUsage = critical,clientAuth
|
||||
32
examples/data/x509/x509/server_cert.pem
Normal file
32
examples/data/x509/x509/server_cert.pem
Normal file
@ -0,0 +1,32 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||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RHb47mM0K8HEq+IU2nAq6/29Ka0IZlkb5fPoWzQAZEIVKgLNHt4
|
||||
96g9AgMBAAGjXjBcMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFNx36JXsCIzVWCOw
|
||||
1ETtaxlN79XrMA4GA1UdDwEB/wQEAwIDqDAdBgNVHREEFjAUghIqLnRlc3QuZXhh
|
||||
bXBsZS5jb20wDQYJKoZIhvcNAQELBQADggIBAAEEZln7lsS/HIysNPJktc0Gdu3n
|
||||
X1BcA3wXh95YTugcxSSeLLx2SykXnwX+cJncc1OKbboO9DA5mZ+huCesGIOKeUkg
|
||||
azQZL6FAdw9PQKdqKg3RgSQ4XhK990fPcmmBhSXY24jNNhRHxGw5lGBrD6X2SdW3
|
||||
m66yYzn9hMXL4yrweGO7OC4bdyISDrJiP+St/xeCoIcXP2s07dE6jl2VorJCWn4J
|
||||
SxKfDhPPohZKl6dL9npkmPcpz2zRAYpo4tsVdAAQDBRui44Vvm1eBPUo7EH2UOEh
|
||||
/3JtTeDUpldM8fDaKE0kTa1Ttxzs2e0Jm3M4/FMOxqSesyJldw54F4+4m24e/iQU
|
||||
gceArYMFVFTipgrLfUuRvRxx/7D7V92pqTyuD3T78+KdTqrlxvCTOqSHhFE05jWD
|
||||
RdynS6Ev/1QZLlnWgMwhQAnjhc1NKkso+namF1ZmHH9owiTRBlWDMNcHMDReaELd
|
||||
QmFUvutHUpjidt1z+G6lzbP0XB5w+0vW4BsT0FqaYsFbK5ftryj1/K0VctrSd/ke
|
||||
GI0vxrErAyLG2B8bdK88u2w7DCuXjAOp+CeA7HUmk93TsPEAhrxQ6lR51IC6LcK0
|
||||
gACSdnQDPGtkoRX00DTvdcOpzmkSgaGr/mXTqp2lR9IuZIhwKbhS3lDKsAZ/hinB
|
||||
yaBwLiXfcvZrZOwy
|
||||
-----END CERTIFICATE-----
|
||||
51
examples/data/x509/x509/server_key.pem
Normal file
51
examples/data/x509/x509/server_key.pem
Normal file
@ -0,0 +1,51 @@
|
||||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6aL4K1ENdjo6DNTGgPMfISE79WrmGBIKtB//uMqy
|
||||
fGTUSPeo+R5WmTGN29YxAnRE/jtwOgAcicACTc0e9nghHj3c2raI0IazY5XFP0/h
|
||||
LszTNUQzWx6DjWsbB+Ymuhu4fHZTYftCrIMpjmjC9pkNggeJnkxylQz/pwO73uWg
|
||||
ycDgJhRyaVhM8sJXiBk+OC/ySP2Lxo60aPa514LEYJKQxUCukCTXth/6p0Qo
|
||||
-----END RSA PRIVATE KEY-----
|
||||
48
examples/encryption/README.md
Normal file
48
examples/encryption/README.md
Normal file
@ -0,0 +1,48 @@
|
||||
# Encryption
|
||||
|
||||
This directory contains two related examples: one for TLS and one for mTLS.
|
||||
|
||||
## Try it
|
||||
|
||||
In each example's subdirectory:
|
||||
|
||||
```
|
||||
node server.js
|
||||
```
|
||||
|
||||
```
|
||||
node client.js
|
||||
```
|
||||
|
||||
## Explanation
|
||||
|
||||
### TLS
|
||||
|
||||
TLS is a commonly used cryptographic protocol to provide end-to-end communication security. In the example, we show how to set up a server authenticated TLS connection to transmit RPC.
|
||||
|
||||
The function [`grpc.credentials.createSsl`](https://grpc.github.io/grpc/node/grpc.credentials.html#.createSsl__anchor) can be used to create client TLS credentials, and the function [`grpc.ServerCredentials.createSsl`](https://grpc.github.io/grpc/node/grpc.ServerCredentials.html#.createSsl__anchor) can be used to create server TLS credentials.
|
||||
|
||||
This example uses public/private keys created in advance (found in `examples/data/x509`):
|
||||
|
||||
- `server_cert.pem` contains the server certificate (public key).
|
||||
- `server_key.pem` contains the server private key.
|
||||
- `ca_cert.pem` contains the certificate (certificate authority) that can verify the server's certificate.
|
||||
|
||||
The server credentials can be passed to the `Server#bindAsync` method, and the client credentials can be passed to the `Client` constructor.
|
||||
|
||||
### mTLS
|
||||
|
||||
In mutual TLS (mTLS), the client and the server authenticate each other. gRPC allows users to configure mutual TLS at the connection level.
|
||||
|
||||
This example uses public/private keys created in advance (found in `examples/data/x509`):
|
||||
|
||||
- `server_cert.pem` contains the server's certificate (public key).
|
||||
- `server_key.pem` contains the server's private key.
|
||||
- `ca_cert.pem` contains the certificate of the certificate authority that can verify the server's certificate.
|
||||
- `client_cert.pem` contains the client's certificate (public key).
|
||||
- `client_key.pem` contains the client's private key.
|
||||
- `client_ca_cert.pem` contains the certificate of the certificate authority that can verify the client's certificate.
|
||||
|
||||
In normal TLS, the server is only concerned with presenting the server certificate for clients to verify. In mutual TLS, the server also loads in a list of trusted CA files for verifying the client's presented certificates. This is done by passing the CA file as the first argument to `grpc.ServerCredentials.createSsl`, and by setting the last argument `checkClientCertificate` to `true`.
|
||||
|
||||
In normal TLS, the client is only concerned with authenticating the server by using one or more trusted CA file. In mutual TLS, the client also presents its client certificate to the server for authentication. This is done by passing the key and cert files as the second and third arguments to `grpc.credentials.createSsl`.
|
||||
64
examples/encryption/TLS/client.js
Normal file
64
examples/encryption/TLS/client.js
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2025 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
const grpc = require('@grpc/grpc-js');
|
||||
const protoLoader = require('@grpc/proto-loader');
|
||||
const parseArgs = require('minimist');
|
||||
const fs = require('fs');
|
||||
|
||||
const PROTO_PATH = __dirname + '/../../protos/echo.proto';
|
||||
|
||||
const packageDefinition = protoLoader.loadSync(
|
||||
PROTO_PATH,
|
||||
{keepCase: true,
|
||||
longs: String,
|
||||
enums: String,
|
||||
defaults: true,
|
||||
oneofs: true
|
||||
});
|
||||
const echoProto = grpc.loadPackageDefinition(packageDefinition).grpc.examples.echo;
|
||||
|
||||
const DATA_DIR = `${__dirname}/../../data/x509`;
|
||||
|
||||
function callUnaryEcho(client, message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const deadline = new Date();
|
||||
deadline.setSeconds(deadline.getSeconds() + 10);
|
||||
client.unaryEcho({message: message}, {deadline}, (error, value) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
console.log(`UnaryEcho: ${JSON.stringify(value)}`);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
let argv = parseArgs(process.argv.slice(2), {
|
||||
string: 'target',
|
||||
default: {target: 'localhost:50051'}
|
||||
});
|
||||
const caFile = fs.readFileSync(`${DATA_DIR}/ca_cert.pem`);
|
||||
const credentials = grpc.credentials.createSsl(caFile)
|
||||
const client = new echoProto.Echo(argv.target, credentials, {'grpc.ssl_target_name_override': 'x.test.example.com'});
|
||||
await callUnaryEcho(client, 'hello world');
|
||||
}
|
||||
|
||||
main()
|
||||
61
examples/encryption/TLS/server.js
Normal file
61
examples/encryption/TLS/server.js
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2025 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
const grpc = require('@grpc/grpc-js');
|
||||
const protoLoader = require('@grpc/proto-loader');
|
||||
const parseArgs = require('minimist');
|
||||
const fs = require('fs');
|
||||
|
||||
const PROTO_PATH = __dirname + '/../../protos/echo.proto';
|
||||
|
||||
const packageDefinition = protoLoader.loadSync(
|
||||
PROTO_PATH,
|
||||
{keepCase: true,
|
||||
longs: String,
|
||||
enums: String,
|
||||
defaults: true,
|
||||
oneofs: true
|
||||
});
|
||||
const echoProto = grpc.loadPackageDefinition(packageDefinition).grpc.examples.echo;
|
||||
|
||||
const DATA_DIR = `${__dirname}/../../data/x509`;
|
||||
|
||||
function unaryEcho(call, callback) {
|
||||
console.log(`unary echoing message ${call.request.message}`);
|
||||
callback(null, call.request);
|
||||
}
|
||||
|
||||
function main() {
|
||||
const argv = parseArgs(process.argv.slice(2), {
|
||||
string: 'port',
|
||||
default: {port: '50051'}
|
||||
});
|
||||
const server = new grpc.Server();
|
||||
server.addService(echoProto.Echo.service, { unaryEcho });
|
||||
const keyFile = fs.readFileSync(`${DATA_DIR}/server_key.pem`);
|
||||
const certFile = fs.readFileSync(`${DATA_DIR}/server_cert.pem`);
|
||||
const credentials = grpc.ServerCredentials.createSsl(null, [{ private_key: keyFile, cert_chain: certFile }]);
|
||||
server.bindAsync(`0.0.0.0:${argv.port}`, credentials, (err, port) => {
|
||||
if (err != null) {
|
||||
return console.error(err);
|
||||
}
|
||||
console.log(`gRPC listening on ${port}`)
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
||||
66
examples/encryption/mTLS/client.js
Normal file
66
examples/encryption/mTLS/client.js
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2025 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
const grpc = require('@grpc/grpc-js');
|
||||
const protoLoader = require('@grpc/proto-loader');
|
||||
const parseArgs = require('minimist');
|
||||
const fs = require('fs');
|
||||
|
||||
const PROTO_PATH = __dirname + '/../../protos/echo.proto';
|
||||
|
||||
const packageDefinition = protoLoader.loadSync(
|
||||
PROTO_PATH,
|
||||
{keepCase: true,
|
||||
longs: String,
|
||||
enums: String,
|
||||
defaults: true,
|
||||
oneofs: true
|
||||
});
|
||||
const echoProto = grpc.loadPackageDefinition(packageDefinition).grpc.examples.echo;
|
||||
|
||||
const DATA_DIR = `${__dirname}/../../data/x509`;
|
||||
|
||||
function callUnaryEcho(client, message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const deadline = new Date();
|
||||
deadline.setSeconds(deadline.getSeconds() + 10);
|
||||
client.unaryEcho({message: message}, {deadline}, (error, value) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
console.log(`UnaryEcho: ${JSON.stringify(value)}`);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
let argv = parseArgs(process.argv.slice(2), {
|
||||
string: 'target',
|
||||
default: {target: 'localhost:50051'}
|
||||
});
|
||||
const caFile = fs.readFileSync(`${DATA_DIR}/ca_cert.pem`);
|
||||
const keyFile = fs.readFileSync(`${DATA_DIR}/client_key.pem`);
|
||||
const certFile = fs.readFileSync(`${DATA_DIR}/client_cert.pem`);
|
||||
const credentials = grpc.credentials.createSsl(caFile, keyFile, certFile);
|
||||
const client = new echoProto.Echo(argv.target, credentials, {'grpc.ssl_target_name_override': 'x.test.example.com'});
|
||||
await callUnaryEcho(client, 'hello world');
|
||||
}
|
||||
|
||||
main()
|
||||
62
examples/encryption/mTLS/server.js
Normal file
62
examples/encryption/mTLS/server.js
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2025 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
const grpc = require('@grpc/grpc-js');
|
||||
const protoLoader = require('@grpc/proto-loader');
|
||||
const parseArgs = require('minimist');
|
||||
const fs = require('fs');
|
||||
|
||||
const PROTO_PATH = __dirname + '/../../protos/echo.proto';
|
||||
|
||||
const packageDefinition = protoLoader.loadSync(
|
||||
PROTO_PATH,
|
||||
{keepCase: true,
|
||||
longs: String,
|
||||
enums: String,
|
||||
defaults: true,
|
||||
oneofs: true
|
||||
});
|
||||
const echoProto = grpc.loadPackageDefinition(packageDefinition).grpc.examples.echo;
|
||||
|
||||
const DATA_DIR = `${__dirname}/../../data/x509`;
|
||||
|
||||
function unaryEcho(call, callback) {
|
||||
console.log(`unary echoing message ${call.request.message}`);
|
||||
callback(null, call.request);
|
||||
}
|
||||
|
||||
function main() {
|
||||
const argv = parseArgs(process.argv.slice(2), {
|
||||
string: 'port',
|
||||
default: {port: '50051'}
|
||||
});
|
||||
const server = new grpc.Server();
|
||||
server.addService(echoProto.Echo.service, { unaryEcho });
|
||||
const clientCaFile = fs.readFileSync(`${DATA_DIR}/client_ca_cert.pem`);
|
||||
const keyFile = fs.readFileSync(`${DATA_DIR}/server_key.pem`);
|
||||
const certFile = fs.readFileSync(`${DATA_DIR}/server_cert.pem`);
|
||||
const credentials = grpc.ServerCredentials.createSsl(clientCaFile, [{ private_key: keyFile, cert_chain: certFile }], true);
|
||||
server.bindAsync(`0.0.0.0:${argv.port}`, credentials, (err, port) => {
|
||||
if (err != null) {
|
||||
return console.error(err);
|
||||
}
|
||||
console.log(`gRPC listening on ${port}`)
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
||||
@ -237,7 +237,6 @@ if (require.main === module) {
|
||||
fs.readFile(path.resolve(argv.db_path), function(err, data) {
|
||||
if (err) throw err;
|
||||
feature_list = JSON.parse(data);
|
||||
routeServer.start();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "grpc-health-check",
|
||||
"version": "2.0.2",
|
||||
"version": "2.1.0",
|
||||
"author": "Google Inc.",
|
||||
"description": "Health check client and service for use with gRPC-node",
|
||||
"repository": {
|
||||
|
||||
@ -21,6 +21,8 @@ import { loadSync, ServiceDefinition } from '@grpc/proto-loader';
|
||||
import { HealthCheckRequest__Output } from './generated/grpc/health/v1/HealthCheckRequest';
|
||||
import { HealthCheckResponse } from './generated/grpc/health/v1/HealthCheckResponse';
|
||||
import { sendUnaryData, Server, ServerUnaryCall, ServerWritableStream } from './server-type';
|
||||
import { HealthListRequest } from './generated/grpc/health/v1/HealthListRequest';
|
||||
import { HealthListResponse } from './generated/grpc/health/v1/HealthListResponse';
|
||||
|
||||
const loadedProto = loadSync('health/v1/health.proto', {
|
||||
keepCase: true,
|
||||
@ -34,6 +36,8 @@ const loadedProto = loadSync('health/v1/health.proto', {
|
||||
export const service = loadedProto['grpc.health.v1.Health'] as ServiceDefinition;
|
||||
|
||||
const GRPC_STATUS_NOT_FOUND = 5;
|
||||
const GRPC_STATUS_RESOURCE_EXHAUSTED = 8;
|
||||
const RESOURCE_EXHAUSTION_LIMIT = 100;
|
||||
|
||||
export type ServingStatus = 'UNKNOWN' | 'SERVING' | 'NOT_SERVING';
|
||||
|
||||
@ -104,7 +108,25 @@ export class HealthImplementation {
|
||||
} else {
|
||||
call.write({status: 'SERVICE_UNKNOWN'});
|
||||
}
|
||||
}
|
||||
},
|
||||
list: (_call: ServerUnaryCall<HealthListRequest, HealthListResponse>, callback: sendUnaryData<HealthListResponse>) => {
|
||||
const statuses: { [key: string]: HealthCheckResponse } = {};
|
||||
let serviceCount = 0;
|
||||
|
||||
for (const [serviceName, status] of this.statusMap.entries()) {
|
||||
if (serviceCount >= RESOURCE_EXHAUSTION_LIMIT) {
|
||||
const error = {
|
||||
code: GRPC_STATUS_RESOURCE_EXHAUSTED,
|
||||
details: 'Too many services to list.',
|
||||
};
|
||||
callback(error, null);
|
||||
return;
|
||||
}
|
||||
statuses[serviceName] = { status };
|
||||
serviceCount++;
|
||||
}
|
||||
callback(null, { statuses });
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,8 @@ import type * as grpc from '@grpc/grpc-js'
|
||||
import type { MethodDefinition } from '@grpc/proto-loader'
|
||||
import type { HealthCheckRequest as _grpc_health_v1_HealthCheckRequest, HealthCheckRequest__Output as _grpc_health_v1_HealthCheckRequest__Output } from '../../../grpc/health/v1/HealthCheckRequest';
|
||||
import type { HealthCheckResponse as _grpc_health_v1_HealthCheckResponse, HealthCheckResponse__Output as _grpc_health_v1_HealthCheckResponse__Output } from '../../../grpc/health/v1/HealthCheckResponse';
|
||||
import type { HealthListRequest as _grpc_health_v1_HealthListRequest, HealthListRequest__Output as _grpc_health_v1_HealthListRequest__Output } from '../../../grpc/health/v1/HealthListRequest';
|
||||
import type { HealthListResponse as _grpc_health_v1_HealthListResponse, HealthListResponse__Output as _grpc_health_v1_HealthListResponse__Output } from '../../../grpc/health/v1/HealthListResponse';
|
||||
|
||||
/**
|
||||
* Health is gRPC's mechanism for checking whether a server is able to handle
|
||||
@ -42,6 +44,41 @@ export interface HealthClient extends grpc.Client {
|
||||
check(argument: _grpc_health_v1_HealthCheckRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall;
|
||||
check(argument: _grpc_health_v1_HealthCheckRequest, callback: grpc.requestCallback<_grpc_health_v1_HealthCheckResponse__Output>): grpc.ClientUnaryCall;
|
||||
|
||||
/**
|
||||
* List provides a non-atomic snapshot of the health of all the available
|
||||
* services.
|
||||
*
|
||||
* The server may respond with a RESOURCE_EXHAUSTED error if too many services
|
||||
* exist.
|
||||
*
|
||||
* Clients should set a deadline when calling List, and can declare the server
|
||||
* unhealthy if they do not receive a timely response.
|
||||
*
|
||||
* Clients should keep in mind that the list of health services exposed by an
|
||||
* application can change over the lifetime of the process.
|
||||
*/
|
||||
List(argument: _grpc_health_v1_HealthListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
List(argument: _grpc_health_v1_HealthListRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
List(argument: _grpc_health_v1_HealthListRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
List(argument: _grpc_health_v1_HealthListRequest, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
/**
|
||||
* List provides a non-atomic snapshot of the health of all the available
|
||||
* services.
|
||||
*
|
||||
* The server may respond with a RESOURCE_EXHAUSTED error if too many services
|
||||
* exist.
|
||||
*
|
||||
* Clients should set a deadline when calling List, and can declare the server
|
||||
* unhealthy if they do not receive a timely response.
|
||||
*
|
||||
* Clients should keep in mind that the list of health services exposed by an
|
||||
* application can change over the lifetime of the process.
|
||||
*/
|
||||
list(argument: _grpc_health_v1_HealthListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
list(argument: _grpc_health_v1_HealthListRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
list(argument: _grpc_health_v1_HealthListRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
list(argument: _grpc_health_v1_HealthListRequest, callback: grpc.requestCallback<_grpc_health_v1_HealthListResponse__Output>): grpc.ClientUnaryCall;
|
||||
|
||||
/**
|
||||
* Performs a watch for the serving status of the requested service.
|
||||
* The server will immediately send back a message indicating the current
|
||||
@ -102,6 +139,21 @@ export interface HealthHandlers extends grpc.UntypedServiceImplementation {
|
||||
*/
|
||||
Check: grpc.handleUnaryCall<_grpc_health_v1_HealthCheckRequest__Output, _grpc_health_v1_HealthCheckResponse>;
|
||||
|
||||
/**
|
||||
* List provides a non-atomic snapshot of the health of all the available
|
||||
* services.
|
||||
*
|
||||
* The server may respond with a RESOURCE_EXHAUSTED error if too many services
|
||||
* exist.
|
||||
*
|
||||
* Clients should set a deadline when calling List, and can declare the server
|
||||
* unhealthy if they do not receive a timely response.
|
||||
*
|
||||
* Clients should keep in mind that the list of health services exposed by an
|
||||
* application can change over the lifetime of the process.
|
||||
*/
|
||||
List: grpc.handleUnaryCall<_grpc_health_v1_HealthListRequest__Output, _grpc_health_v1_HealthListResponse>;
|
||||
|
||||
/**
|
||||
* Performs a watch for the serving status of the requested service.
|
||||
* The server will immediately send back a message indicating the current
|
||||
@ -125,5 +177,6 @@ export interface HealthHandlers extends grpc.UntypedServiceImplementation {
|
||||
|
||||
export interface HealthDefinition extends grpc.ServiceDefinition {
|
||||
Check: MethodDefinition<_grpc_health_v1_HealthCheckRequest, _grpc_health_v1_HealthCheckResponse, _grpc_health_v1_HealthCheckRequest__Output, _grpc_health_v1_HealthCheckResponse__Output>
|
||||
List: MethodDefinition<_grpc_health_v1_HealthListRequest, _grpc_health_v1_HealthListResponse, _grpc_health_v1_HealthListRequest__Output, _grpc_health_v1_HealthListResponse__Output>
|
||||
Watch: MethodDefinition<_grpc_health_v1_HealthCheckRequest, _grpc_health_v1_HealthCheckResponse, _grpc_health_v1_HealthCheckRequest__Output, _grpc_health_v1_HealthCheckResponse__Output>
|
||||
}
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
// Original file: proto/health/v1/health.proto
|
||||
|
||||
|
||||
export interface HealthListRequest {
|
||||
}
|
||||
|
||||
export interface HealthListRequest__Output {
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
// Original file: proto/health/v1/health.proto
|
||||
|
||||
import type { HealthCheckResponse as _grpc_health_v1_HealthCheckResponse, HealthCheckResponse__Output as _grpc_health_v1_HealthCheckResponse__Output } from '../../../grpc/health/v1/HealthCheckResponse';
|
||||
|
||||
export interface HealthListResponse {
|
||||
/**
|
||||
* statuses contains all the services and their respective status.
|
||||
*/
|
||||
'statuses'?: ({[key: string]: _grpc_health_v1_HealthCheckResponse});
|
||||
}
|
||||
|
||||
export interface HealthListResponse__Output {
|
||||
/**
|
||||
* statuses contains all the services and their respective status.
|
||||
*/
|
||||
'statuses': ({[key: string]: _grpc_health_v1_HealthCheckResponse__Output});
|
||||
}
|
||||
@ -19,6 +19,8 @@ export interface ProtoGrpcType {
|
||||
Health: SubtypeConstructor<typeof grpc.Client, _grpc_health_v1_HealthClient> & { service: _grpc_health_v1_HealthDefinition }
|
||||
HealthCheckRequest: MessageTypeDefinition
|
||||
HealthCheckResponse: MessageTypeDefinition
|
||||
HealthListRequest: MessageTypeDefinition
|
||||
HealthListResponse: MessageTypeDefinition
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,4 +149,62 @@ describe('Health checking', () => {
|
||||
});
|
||||
})
|
||||
});
|
||||
describe('list', () => {
|
||||
it('Should return all registered service statuses', done => {
|
||||
healthClient.list({}, (error, response) => {
|
||||
assert.ifError(error);
|
||||
assert(response);
|
||||
assert.deepStrictEqual(response.statuses, {
|
||||
'': { status: 'SERVING' },
|
||||
'grpc.test.TestServiceNotServing': { status: 'NOT_SERVING' },
|
||||
'grpc.test.TestServiceServing': { status: 'SERVING' }
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('Should return an empty list when no services are registered', done => {
|
||||
// Create a new server with no services registered
|
||||
const emptyServer = new grpc.Server();
|
||||
const emptyImpl = new HealthImplementation({});
|
||||
emptyImpl.addToServer(emptyServer);
|
||||
emptyServer.bindAsync('localhost:0', grpc.ServerCredentials.createInsecure(), (error, port) => {
|
||||
assert.ifError(error);
|
||||
const HealthClientConstructor = grpc.makeClientConstructor(healthServiceDefinition, 'grpc.health.v1.HealthService');
|
||||
const emptyClient = new HealthClientConstructor(`localhost:${port}`, grpc.credentials.createInsecure()) as unknown as HealthClient;
|
||||
emptyServer.start();
|
||||
emptyClient.list({}, (error, response) => {
|
||||
assert.ifError(error);
|
||||
assert(response);
|
||||
assert.deepStrictEqual(response.statuses, {});
|
||||
emptyClient.close();
|
||||
emptyServer.tryShutdown(done);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('Should return RESOURCE_EXHAUSTED when too many services are registered', done => {
|
||||
const largeStatusMap: ServingStatusMap = {};
|
||||
for (let i = 0; i < 101; i++) {
|
||||
largeStatusMap[`service-${i}`] = 'SERVING';
|
||||
}
|
||||
const largeServer = new grpc.Server();
|
||||
const largeImpl = new HealthImplementation(largeStatusMap);
|
||||
largeImpl.addToServer(largeServer);
|
||||
largeServer.bindAsync('localhost:0', grpc.ServerCredentials.createInsecure(), (error, port) => {
|
||||
assert.ifError(error);
|
||||
const HealthClientConstructor = grpc.makeClientConstructor(healthServiceDefinition, 'grpc.health.v1.HealthService');
|
||||
const largeClient = new HealthClientConstructor(`localhost:${port}`, grpc.credentials.createInsecure()) as unknown as HealthClient;
|
||||
largeServer.start();
|
||||
largeClient.list({}, (error, response) => {
|
||||
assert(error);
|
||||
assert.strictEqual(error.code, grpc.status.RESOURCE_EXHAUSTED);
|
||||
assert.strictEqual(response, undefined);
|
||||
largeClient.close();
|
||||
largeServer.tryShutdown(done);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit cb28da3451f158a947dfc45090fe92b07b243bc1
|
||||
Subproject commit 3a472e524827f72d1ad621c4983dd5af54c46776
|
||||
@ -69,9 +69,9 @@ const copyTestFixtures = checkTask(() =>
|
||||
);
|
||||
|
||||
const runTests = checkTask(() => {
|
||||
process.env.GRPC_EXPERIMENTAL_XDS_FEDERATION = 'true';
|
||||
process.env.GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG = 'true';
|
||||
process.env.GRPC_XDS_EXPERIMENTAL_RBAC = 'true';
|
||||
process.env.GRPC_EXPERIMENTAL_XDS_WRR_LB = 'true';
|
||||
if (Number(process.versions.node.split('.')[0]) <= 14) {
|
||||
process.env.GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH = 'false';
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ COPY --from=build /node/src/grpc-node/packages/grpc-js ./packages/grpc-js/
|
||||
COPY --from=build /node/src/grpc-node/packages/grpc-js-xds ./packages/grpc-js-xds/
|
||||
|
||||
ENV GRPC_VERBOSITY="DEBUG"
|
||||
ENV GRPC_TRACE=xds_client,xds_resolver,xds_cluster_manager,cds_balancer,xds_cluster_resolver,xds_cluster_impl,priority,weighted_target,round_robin,resolving_load_balancer,subchannel,keepalive,dns_resolver,fault_injection,http_filter,csds,outlier_detection,server,server_call,ring_hash,transport,certificate_provider,xds_channel_credentials
|
||||
ENV GRPC_TRACE=xds_client,xds_resolver,xds_cluster_manager,cds_balancer,xds_cluster_resolver,xds_cluster_impl,priority,weighted_target,round_robin,resolving_load_balancer,subchannel,keepalive,dns_resolver,fault_injection,http_filter,csds,outlier_detection,server,server_call,ring_hash,transport,certificate_provider,xds_channel_credentials,backoff
|
||||
ENV NODE_XDS_INTEROP_VERBOSITY=1
|
||||
|
||||
ENTRYPOINT [ "/nodejs/bin/node", "/node/src/grpc-node/packages/grpc-js-xds/build/interop/xds-interop-client" ]
|
||||
|
||||
@ -232,12 +232,36 @@ function getIPv6Addresses(): string[] {
|
||||
return ipv6Addresses;
|
||||
}
|
||||
|
||||
interface ConfiguredMetrics {
|
||||
qps?: number;
|
||||
applicationUtilization?: number;
|
||||
eps?: number;
|
||||
}
|
||||
|
||||
function createInBandMetricsInterceptor(metrics: ConfiguredMetrics) {
|
||||
return function inBandMetricsInterceptor(methodDescriptor: grpc.ServerMethodDefinition<any, any>, call: grpc.ServerInterceptingCallInterface): grpc.ServerInterceptingCall {
|
||||
const metricsRecorder = call.getMetricsRecorder()
|
||||
if (metrics.qps) {
|
||||
metricsRecorder.recordQpsMetric(metrics.qps);
|
||||
}
|
||||
if (metrics.applicationUtilization) {
|
||||
metricsRecorder.recordApplicationUtilizationMetric(metrics.applicationUtilization);
|
||||
}
|
||||
if (metrics.eps) {
|
||||
metricsRecorder.recordEpsMetric(metrics.eps);
|
||||
}
|
||||
return new grpc.ServerInterceptingCall(call);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const argv = yargs
|
||||
.string(['port', 'maintenance_port', 'address_type', 'secure_mode'])
|
||||
.string(['port', 'maintenance_port', 'address_type', 'secure_mode', 'metrics_mode'])
|
||||
.number(['qps', 'application_utilization', 'eps'])
|
||||
.demandOption(['port'])
|
||||
.default('address_type', 'IPV4_IPV6')
|
||||
.default('secure_mode', 'false')
|
||||
.default('metrics_mode', 'NONE')
|
||||
.parse()
|
||||
console.log('Starting xDS interop server. Args: ', argv);
|
||||
const healthImpl = new HealthImplementation({'': 'NOT_SERVING'});
|
||||
@ -253,7 +277,28 @@ async function main() {
|
||||
}
|
||||
const reflection = new ReflectionService(packageDefinition, {
|
||||
services: ['grpc.testing.TestService']
|
||||
})
|
||||
});
|
||||
let metricInterceptor: grpc.ServerInterceptor | null = null;
|
||||
const metricsMode = argv.metrics_mode.toUpperCase();
|
||||
let metricRecorder: grpc.ServerMetricRecorder | null = null;
|
||||
if (metricsMode === 'IN_BAND') {
|
||||
metricInterceptor = createInBandMetricsInterceptor({
|
||||
qps: argv.qps,
|
||||
applicationUtilization: argv.application_utilization,
|
||||
eps: argv.eps
|
||||
});
|
||||
} else if (metricsMode === 'OUT_OF_BAND') {
|
||||
metricRecorder = new grpc.ServerMetricRecorder();
|
||||
if (argv.qps) {
|
||||
metricRecorder.setQpsMetric(argv.qps);
|
||||
}
|
||||
if (argv.application_utilization) {
|
||||
metricRecorder.setApplicationUtilizationMetric(argv.application_utilization);
|
||||
}
|
||||
if (argv.eps) {
|
||||
metricRecorder.setEpsMetric(argv.eps);
|
||||
}
|
||||
}
|
||||
const addressType = argv.address_type.toUpperCase();
|
||||
const secureMode = argv.secure_mode.toLowerCase() == 'true';
|
||||
if (secureMode) {
|
||||
@ -266,19 +311,33 @@ async function main() {
|
||||
reflection.addToServer(maintenanceServer);
|
||||
grpc.addAdminServicesToServer(maintenanceServer);
|
||||
|
||||
const server = new grpc_xds.XdsServer({interceptors: [testInfoInterceptor]});
|
||||
const interceptorList = [testInfoInterceptor];
|
||||
if (metricInterceptor) {
|
||||
interceptorList.push(metricInterceptor);
|
||||
}
|
||||
const server = new grpc_xds.XdsServer({interceptors: interceptorList});
|
||||
server.addService(loadedProto.grpc.testing.TestService.service, testServiceHandler);
|
||||
if (metricRecorder) {
|
||||
metricRecorder.addToServer(server);
|
||||
}
|
||||
const xdsCreds = new grpc_xds.XdsServerCredentials(grpc.ServerCredentials.createInsecure());
|
||||
await Promise.all([
|
||||
serverBindPromise(maintenanceServer, `[::]:${argv.maintenance_port}`, grpc.ServerCredentials.createInsecure()),
|
||||
serverBindPromise(server, `0.0.0.0:${argv.port}`, xdsCreds)
|
||||
]);
|
||||
} else {
|
||||
const interceptorList = [unifiedInterceptor];
|
||||
if (metricInterceptor) {
|
||||
interceptorList.push(metricInterceptor);
|
||||
}
|
||||
const server = new grpc.Server({interceptors: [unifiedInterceptor]});
|
||||
server.addService(loadedProto.grpc.testing.XdsUpdateHealthService.service, xdsUpdateHealthServiceImpl);
|
||||
healthImpl.addToServer(server);
|
||||
reflection.addToServer(server);
|
||||
grpc.addAdminServicesToServer(server);
|
||||
if (metricRecorder) {
|
||||
metricRecorder.addToServer(server);
|
||||
}
|
||||
server.addService(loadedProto.grpc.testing.TestService.service, testServiceHandler);
|
||||
const creds = grpc.ServerCredentials.createInsecure();
|
||||
switch (addressType) {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"prepare": "npm run generate-types && npm run generate-interop-types && npm run generate-test-types && npm run compile",
|
||||
"pretest": "npm run compile",
|
||||
"posttest": "npm run check",
|
||||
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs deps/envoy-api/ deps/xds/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib @grpc/grpc-js envoy/service/discovery/v3/ads.proto envoy/service/load_stats/v3/lrs.proto envoy/config/listener/v3/listener.proto envoy/config/route/v3/route.proto envoy/config/cluster/v3/cluster.proto envoy/config/endpoint/v3/endpoint.proto envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto udpa/type/v1/typed_struct.proto xds/type/v3/typed_struct.proto envoy/extensions/filters/http/fault/v3/fault.proto envoy/service/status/v3/csds.proto envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto envoy/extensions/clusters/aggregate/v3/cluster.proto envoy/extensions/transport_sockets/tls/v3/tls.proto envoy/config/rbac/v3/rbac.proto envoy/extensions/filters/http/rbac/v3/rbac.proto",
|
||||
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs deps/envoy-api/ deps/xds/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib @grpc/grpc-js envoy/service/discovery/v3/ads.proto envoy/service/load_stats/v3/lrs.proto envoy/config/listener/v3/listener.proto envoy/config/route/v3/route.proto envoy/config/cluster/v3/cluster.proto envoy/config/endpoint/v3/endpoint.proto envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto udpa/type/v1/typed_struct.proto xds/type/v3/typed_struct.proto envoy/extensions/filters/http/fault/v3/fault.proto envoy/service/status/v3/csds.proto envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto envoy/extensions/clusters/aggregate/v3/cluster.proto envoy/extensions/transport_sockets/tls/v3/tls.proto envoy/config/rbac/v3/rbac.proto envoy/extensions/filters/http/rbac/v3/rbac.proto envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto",
|
||||
"generate-interop-types": "proto-loader-gen-types --keep-case --longs String --enums String --defaults --oneofs --json --includeComments --includeDirs proto/ -O interop/generated --grpcLib @grpc/grpc-js grpc/testing/test.proto",
|
||||
"generate-test-types": "proto-loader-gen-types --keep-case --longs String --enums String --defaults --oneofs --json --includeComments --includeDirs proto/ -O test/generated --grpcLib @grpc/grpc-js grpc/testing/echo.proto"
|
||||
},
|
||||
@ -34,16 +34,16 @@
|
||||
"devDependencies": {
|
||||
"@grpc/grpc-js": "file:../grpc-js",
|
||||
"@grpc/proto-loader": "file:../proto-loader",
|
||||
"@grpc/reflection": "file:../grpc-reflection",
|
||||
"@types/gulp": "^4.0.6",
|
||||
"@types/gulp-mocha": "0.0.32",
|
||||
"@types/mocha": "^5.2.6",
|
||||
"@types/node": ">=20.11.20",
|
||||
"@grpc/reflection": "file:../grpc-reflection",
|
||||
"@types/yargs": "^15.0.5",
|
||||
"find-free-ports": "^3.1.1",
|
||||
"grpc-health-check": "file:../grpc-health-check",
|
||||
"gts": "^5.0.1",
|
||||
"ncp": "^2.0.0",
|
||||
"portfinder": "^1.0.37",
|
||||
"typescript": "^5.1.3",
|
||||
"yargs": "^15.4.1"
|
||||
},
|
||||
|
||||
@ -34,6 +34,9 @@ echo "source $NVM_DIR/nvm.sh" > ~/.profile
|
||||
echo "source $NVM_DIR/nvm.sh" > ~/.shrc
|
||||
export ENV=~/.shrc
|
||||
|
||||
cd $base
|
||||
git submodule update --init --recursive
|
||||
|
||||
cd $base/../proto-loader
|
||||
npm install
|
||||
|
||||
@ -47,8 +50,6 @@ cd $base/../grpc-reflection
|
||||
npm install
|
||||
|
||||
# grpc-js-xds has a dev dependency on "../grpc-js", so it should pull that in automatically
|
||||
cd $base
|
||||
git submodule update --init --recursive
|
||||
npm install
|
||||
|
||||
cd ../../..
|
||||
|
||||
@ -21,10 +21,11 @@
|
||||
export const EXPERIMENTAL_FAULT_INJECTION = (process.env.GRPC_XDS_EXPERIMENTAL_FAULT_INJECTION ?? 'true') === 'true';
|
||||
export const EXPERIMENTAL_OUTLIER_DETECTION = (process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION ?? 'true') === 'true';
|
||||
export const EXPERIMENTAL_RETRY = (process.env.GRPC_XDS_EXPERIMENTAL_ENABLE_RETRY ?? 'true') === 'true';
|
||||
export const EXPERIMENTAL_FEDERATION = (process.env.GRPC_EXPERIMENTAL_XDS_FEDERATION ?? 'false') === 'true';
|
||||
export const EXPERIMENTAL_FEDERATION = (process.env.GRPC_EXPERIMENTAL_XDS_FEDERATION ?? 'true') === 'true';
|
||||
export const EXPERIMENTAL_CUSTOM_LB_CONFIG = (process.env.GRPC_EXPERIMENTAL_XDS_CUSTOM_LB_CONFIG ?? 'true') === 'true';
|
||||
export const EXPERIMENTAL_RING_HASH = (process.env.GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH ?? 'true') === 'true';
|
||||
export const EXPERIMENTAL_PICK_FIRST = (process.env.GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG ?? 'false') === 'true';
|
||||
export const EXPERIMENTAL_DUALSTACK_ENDPOINTS = (process.env.GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS ?? 'true') === 'true';
|
||||
export const AGGREGATE_CLUSTER_BACKWARDS_COMPAT = (process.env.GRPC_XDS_AGGREGATE_CLUSTER_BACKWARD_COMPAT ?? 'false') === 'true';
|
||||
export const EXPERIMENTAL_RBAC = (process.env.GRPC_XDS_EXPERIMENTAL_RBAC ?? 'false') === 'true';
|
||||
export const EXPERIMENTAL_WRR_LB = (process.env.GRPC_EXPERIMENTAL_XDS_WRR_LB ?? 'false') === 'true';
|
||||
|
||||
153
packages/grpc-js-xds/src/generated/client_side_weighted_round_robin.ts
generated
Normal file
153
packages/grpc-js-xds/src/generated/client_side_weighted_round_robin.ts
generated
Normal file
@ -0,0 +1,153 @@
|
||||
import type * as grpc from '@grpc/grpc-js';
|
||||
import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader';
|
||||
|
||||
import type { ClientSideWeightedRoundRobin as _envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_ClientSideWeightedRoundRobin, ClientSideWeightedRoundRobin__Output as _envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_ClientSideWeightedRoundRobin__Output } from './envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/ClientSideWeightedRoundRobin';
|
||||
import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from './google/protobuf/BoolValue';
|
||||
import type { BytesValue as _google_protobuf_BytesValue, BytesValue__Output as _google_protobuf_BytesValue__Output } from './google/protobuf/BytesValue';
|
||||
import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from './google/protobuf/DescriptorProto';
|
||||
import type { DoubleValue as _google_protobuf_DoubleValue, DoubleValue__Output as _google_protobuf_DoubleValue__Output } from './google/protobuf/DoubleValue';
|
||||
import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from './google/protobuf/Duration';
|
||||
import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from './google/protobuf/EnumDescriptorProto';
|
||||
import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from './google/protobuf/EnumOptions';
|
||||
import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from './google/protobuf/EnumValueDescriptorProto';
|
||||
import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from './google/protobuf/EnumValueOptions';
|
||||
import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from './google/protobuf/ExtensionRangeOptions';
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from './google/protobuf/FeatureSet';
|
||||
import type { FeatureSetDefaults as _google_protobuf_FeatureSetDefaults, FeatureSetDefaults__Output as _google_protobuf_FeatureSetDefaults__Output } from './google/protobuf/FeatureSetDefaults';
|
||||
import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from './google/protobuf/FieldDescriptorProto';
|
||||
import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from './google/protobuf/FieldOptions';
|
||||
import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from './google/protobuf/FileDescriptorProto';
|
||||
import type { FileDescriptorSet as _google_protobuf_FileDescriptorSet, FileDescriptorSet__Output as _google_protobuf_FileDescriptorSet__Output } from './google/protobuf/FileDescriptorSet';
|
||||
import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from './google/protobuf/FileOptions';
|
||||
import type { FloatValue as _google_protobuf_FloatValue, FloatValue__Output as _google_protobuf_FloatValue__Output } from './google/protobuf/FloatValue';
|
||||
import type { GeneratedCodeInfo as _google_protobuf_GeneratedCodeInfo, GeneratedCodeInfo__Output as _google_protobuf_GeneratedCodeInfo__Output } from './google/protobuf/GeneratedCodeInfo';
|
||||
import type { Int32Value as _google_protobuf_Int32Value, Int32Value__Output as _google_protobuf_Int32Value__Output } from './google/protobuf/Int32Value';
|
||||
import type { Int64Value as _google_protobuf_Int64Value, Int64Value__Output as _google_protobuf_Int64Value__Output } from './google/protobuf/Int64Value';
|
||||
import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from './google/protobuf/MessageOptions';
|
||||
import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from './google/protobuf/MethodDescriptorProto';
|
||||
import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from './google/protobuf/MethodOptions';
|
||||
import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from './google/protobuf/OneofDescriptorProto';
|
||||
import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from './google/protobuf/OneofOptions';
|
||||
import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from './google/protobuf/ServiceDescriptorProto';
|
||||
import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from './google/protobuf/ServiceOptions';
|
||||
import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from './google/protobuf/SourceCodeInfo';
|
||||
import type { StringValue as _google_protobuf_StringValue, StringValue__Output as _google_protobuf_StringValue__Output } from './google/protobuf/StringValue';
|
||||
import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from './google/protobuf/Timestamp';
|
||||
import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from './google/protobuf/UInt32Value';
|
||||
import type { UInt64Value as _google_protobuf_UInt64Value, UInt64Value__Output as _google_protobuf_UInt64Value__Output } from './google/protobuf/UInt64Value';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from './google/protobuf/UninterpretedOption';
|
||||
import type { StatusAnnotation as _udpa_annotations_StatusAnnotation, StatusAnnotation__Output as _udpa_annotations_StatusAnnotation__Output } from './udpa/annotations/StatusAnnotation';
|
||||
import type { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from './validate/AnyRules';
|
||||
import type { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from './validate/BoolRules';
|
||||
import type { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from './validate/BytesRules';
|
||||
import type { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from './validate/DoubleRules';
|
||||
import type { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from './validate/DurationRules';
|
||||
import type { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from './validate/EnumRules';
|
||||
import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from './validate/FieldRules';
|
||||
import type { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from './validate/Fixed32Rules';
|
||||
import type { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from './validate/Fixed64Rules';
|
||||
import type { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from './validate/FloatRules';
|
||||
import type { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from './validate/Int32Rules';
|
||||
import type { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from './validate/Int64Rules';
|
||||
import type { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from './validate/MapRules';
|
||||
import type { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from './validate/MessageRules';
|
||||
import type { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from './validate/RepeatedRules';
|
||||
import type { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from './validate/SFixed32Rules';
|
||||
import type { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from './validate/SFixed64Rules';
|
||||
import type { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from './validate/SInt32Rules';
|
||||
import type { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from './validate/SInt64Rules';
|
||||
import type { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from './validate/StringRules';
|
||||
import type { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from './validate/TimestampRules';
|
||||
import type { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from './validate/UInt32Rules';
|
||||
import type { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from './validate/UInt64Rules';
|
||||
|
||||
type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype> = {
|
||||
new(...args: ConstructorParameters<Constructor>): Subtype;
|
||||
};
|
||||
|
||||
export interface ProtoGrpcType {
|
||||
envoy: {
|
||||
extensions: {
|
||||
load_balancing_policies: {
|
||||
client_side_weighted_round_robin: {
|
||||
v3: {
|
||||
ClientSideWeightedRoundRobin: MessageTypeDefinition<_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_ClientSideWeightedRoundRobin, _envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_ClientSideWeightedRoundRobin__Output>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
google: {
|
||||
protobuf: {
|
||||
BoolValue: MessageTypeDefinition<_google_protobuf_BoolValue, _google_protobuf_BoolValue__Output>
|
||||
BytesValue: MessageTypeDefinition<_google_protobuf_BytesValue, _google_protobuf_BytesValue__Output>
|
||||
DescriptorProto: MessageTypeDefinition<_google_protobuf_DescriptorProto, _google_protobuf_DescriptorProto__Output>
|
||||
DoubleValue: MessageTypeDefinition<_google_protobuf_DoubleValue, _google_protobuf_DoubleValue__Output>
|
||||
Duration: MessageTypeDefinition<_google_protobuf_Duration, _google_protobuf_Duration__Output>
|
||||
Edition: EnumTypeDefinition
|
||||
EnumDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumDescriptorProto, _google_protobuf_EnumDescriptorProto__Output>
|
||||
EnumOptions: MessageTypeDefinition<_google_protobuf_EnumOptions, _google_protobuf_EnumOptions__Output>
|
||||
EnumValueDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumValueDescriptorProto, _google_protobuf_EnumValueDescriptorProto__Output>
|
||||
EnumValueOptions: MessageTypeDefinition<_google_protobuf_EnumValueOptions, _google_protobuf_EnumValueOptions__Output>
|
||||
ExtensionRangeOptions: MessageTypeDefinition<_google_protobuf_ExtensionRangeOptions, _google_protobuf_ExtensionRangeOptions__Output>
|
||||
FeatureSet: MessageTypeDefinition<_google_protobuf_FeatureSet, _google_protobuf_FeatureSet__Output>
|
||||
FeatureSetDefaults: MessageTypeDefinition<_google_protobuf_FeatureSetDefaults, _google_protobuf_FeatureSetDefaults__Output>
|
||||
FieldDescriptorProto: MessageTypeDefinition<_google_protobuf_FieldDescriptorProto, _google_protobuf_FieldDescriptorProto__Output>
|
||||
FieldOptions: MessageTypeDefinition<_google_protobuf_FieldOptions, _google_protobuf_FieldOptions__Output>
|
||||
FileDescriptorProto: MessageTypeDefinition<_google_protobuf_FileDescriptorProto, _google_protobuf_FileDescriptorProto__Output>
|
||||
FileDescriptorSet: MessageTypeDefinition<_google_protobuf_FileDescriptorSet, _google_protobuf_FileDescriptorSet__Output>
|
||||
FileOptions: MessageTypeDefinition<_google_protobuf_FileOptions, _google_protobuf_FileOptions__Output>
|
||||
FloatValue: MessageTypeDefinition<_google_protobuf_FloatValue, _google_protobuf_FloatValue__Output>
|
||||
GeneratedCodeInfo: MessageTypeDefinition<_google_protobuf_GeneratedCodeInfo, _google_protobuf_GeneratedCodeInfo__Output>
|
||||
Int32Value: MessageTypeDefinition<_google_protobuf_Int32Value, _google_protobuf_Int32Value__Output>
|
||||
Int64Value: MessageTypeDefinition<_google_protobuf_Int64Value, _google_protobuf_Int64Value__Output>
|
||||
MessageOptions: MessageTypeDefinition<_google_protobuf_MessageOptions, _google_protobuf_MessageOptions__Output>
|
||||
MethodDescriptorProto: MessageTypeDefinition<_google_protobuf_MethodDescriptorProto, _google_protobuf_MethodDescriptorProto__Output>
|
||||
MethodOptions: MessageTypeDefinition<_google_protobuf_MethodOptions, _google_protobuf_MethodOptions__Output>
|
||||
OneofDescriptorProto: MessageTypeDefinition<_google_protobuf_OneofDescriptorProto, _google_protobuf_OneofDescriptorProto__Output>
|
||||
OneofOptions: MessageTypeDefinition<_google_protobuf_OneofOptions, _google_protobuf_OneofOptions__Output>
|
||||
ServiceDescriptorProto: MessageTypeDefinition<_google_protobuf_ServiceDescriptorProto, _google_protobuf_ServiceDescriptorProto__Output>
|
||||
ServiceOptions: MessageTypeDefinition<_google_protobuf_ServiceOptions, _google_protobuf_ServiceOptions__Output>
|
||||
SourceCodeInfo: MessageTypeDefinition<_google_protobuf_SourceCodeInfo, _google_protobuf_SourceCodeInfo__Output>
|
||||
StringValue: MessageTypeDefinition<_google_protobuf_StringValue, _google_protobuf_StringValue__Output>
|
||||
SymbolVisibility: EnumTypeDefinition
|
||||
Timestamp: MessageTypeDefinition<_google_protobuf_Timestamp, _google_protobuf_Timestamp__Output>
|
||||
UInt32Value: MessageTypeDefinition<_google_protobuf_UInt32Value, _google_protobuf_UInt32Value__Output>
|
||||
UInt64Value: MessageTypeDefinition<_google_protobuf_UInt64Value, _google_protobuf_UInt64Value__Output>
|
||||
UninterpretedOption: MessageTypeDefinition<_google_protobuf_UninterpretedOption, _google_protobuf_UninterpretedOption__Output>
|
||||
}
|
||||
}
|
||||
udpa: {
|
||||
annotations: {
|
||||
PackageVersionStatus: EnumTypeDefinition
|
||||
StatusAnnotation: MessageTypeDefinition<_udpa_annotations_StatusAnnotation, _udpa_annotations_StatusAnnotation__Output>
|
||||
}
|
||||
}
|
||||
validate: {
|
||||
AnyRules: MessageTypeDefinition<_validate_AnyRules, _validate_AnyRules__Output>
|
||||
BoolRules: MessageTypeDefinition<_validate_BoolRules, _validate_BoolRules__Output>
|
||||
BytesRules: MessageTypeDefinition<_validate_BytesRules, _validate_BytesRules__Output>
|
||||
DoubleRules: MessageTypeDefinition<_validate_DoubleRules, _validate_DoubleRules__Output>
|
||||
DurationRules: MessageTypeDefinition<_validate_DurationRules, _validate_DurationRules__Output>
|
||||
EnumRules: MessageTypeDefinition<_validate_EnumRules, _validate_EnumRules__Output>
|
||||
FieldRules: MessageTypeDefinition<_validate_FieldRules, _validate_FieldRules__Output>
|
||||
Fixed32Rules: MessageTypeDefinition<_validate_Fixed32Rules, _validate_Fixed32Rules__Output>
|
||||
Fixed64Rules: MessageTypeDefinition<_validate_Fixed64Rules, _validate_Fixed64Rules__Output>
|
||||
FloatRules: MessageTypeDefinition<_validate_FloatRules, _validate_FloatRules__Output>
|
||||
Int32Rules: MessageTypeDefinition<_validate_Int32Rules, _validate_Int32Rules__Output>
|
||||
Int64Rules: MessageTypeDefinition<_validate_Int64Rules, _validate_Int64Rules__Output>
|
||||
KnownRegex: EnumTypeDefinition
|
||||
MapRules: MessageTypeDefinition<_validate_MapRules, _validate_MapRules__Output>
|
||||
MessageRules: MessageTypeDefinition<_validate_MessageRules, _validate_MessageRules__Output>
|
||||
RepeatedRules: MessageTypeDefinition<_validate_RepeatedRules, _validate_RepeatedRules__Output>
|
||||
SFixed32Rules: MessageTypeDefinition<_validate_SFixed32Rules, _validate_SFixed32Rules__Output>
|
||||
SFixed64Rules: MessageTypeDefinition<_validate_SFixed64Rules, _validate_SFixed64Rules__Output>
|
||||
SInt32Rules: MessageTypeDefinition<_validate_SInt32Rules, _validate_SInt32Rules__Output>
|
||||
SInt64Rules: MessageTypeDefinition<_validate_SInt64Rules, _validate_SInt64Rules__Output>
|
||||
StringRules: MessageTypeDefinition<_validate_StringRules, _validate_StringRules__Output>
|
||||
TimestampRules: MessageTypeDefinition<_validate_TimestampRules, _validate_TimestampRules__Output>
|
||||
UInt32Rules: MessageTypeDefinition<_validate_UInt32Rules, _validate_UInt32Rules__Output>
|
||||
UInt64Rules: MessageTypeDefinition<_validate_UInt64Rules, _validate_UInt64Rules__Output>
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,129 @@
|
||||
// Original file: deps/envoy-api/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto
|
||||
|
||||
import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../../google/protobuf/BoolValue';
|
||||
import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../../google/protobuf/Duration';
|
||||
import type { FloatValue as _google_protobuf_FloatValue, FloatValue__Output as _google_protobuf_FloatValue__Output } from '../../../../../google/protobuf/FloatValue';
|
||||
|
||||
/**
|
||||
* Configuration for the client_side_weighted_round_robin LB policy.
|
||||
*
|
||||
* This policy differs from the built-in ROUND_ROBIN policy in terms of
|
||||
* how the endpoint weights are determined. In the ROUND_ROBIN policy,
|
||||
* the endpoint weights are sent by the control plane via EDS. However,
|
||||
* in this policy, the endpoint weights are instead determined via qps (queries
|
||||
* per second), eps (errors per second), and utilization metrics sent by the
|
||||
* endpoint using the Open Request Cost Aggregation (ORCA) protocol. Utilization
|
||||
* is determined by using the ORCA application_utilization field, if set, or
|
||||
* else falling back to the cpu_utilization field. All queries count toward qps,
|
||||
* regardless of result. Only failed queries count toward eps. A config
|
||||
* parameter error_utilization_penalty controls the penalty to adjust endpoint
|
||||
* weights using eps and qps. The weight of a given endpoint is computed as:
|
||||
* qps / (utilization + eps/qps * error_utilization_penalty)
|
||||
*
|
||||
* See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.
|
||||
*
|
||||
* [#next-free-field: 7]
|
||||
*/
|
||||
export interface ClientSideWeightedRoundRobin {
|
||||
/**
|
||||
* Whether to enable out-of-band utilization reporting collection from
|
||||
* the endpoints. By default, per-request utilization reporting is used.
|
||||
*/
|
||||
'enable_oob_load_report'?: (_google_protobuf_BoolValue | null);
|
||||
/**
|
||||
* Load reporting interval to request from the server. Note that the
|
||||
* server may not provide reports as frequently as the client requests.
|
||||
* Used only when enable_oob_load_report is true. Default is 10 seconds.
|
||||
*/
|
||||
'oob_reporting_period'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* A given endpoint must report load metrics continuously for at least
|
||||
* this long before the endpoint weight will be used. This avoids
|
||||
* churn when the set of endpoint addresses changes. Takes effect
|
||||
* both immediately after we establish a connection to an endpoint and
|
||||
* after weight_expiration_period has caused us to stop using the most
|
||||
* recent load metrics. Default is 10 seconds.
|
||||
*/
|
||||
'blackout_period'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* If a given endpoint has not reported load metrics in this long,
|
||||
* then we stop using the reported weight. This ensures that we do
|
||||
* not continue to use very stale weights. Once we stop using a stale
|
||||
* value, if we later start seeing fresh reports again, the
|
||||
* blackout_period applies. Defaults to 3 minutes.
|
||||
*/
|
||||
'weight_expiration_period'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* How often endpoint weights are recalculated. Values less than 100ms are
|
||||
* capped at 100ms. Default is 1 second.
|
||||
*/
|
||||
'weight_update_period'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* The multiplier used to adjust endpoint weights with the error rate
|
||||
* calculated as eps/qps. Configuration is rejected if this value is negative.
|
||||
* Default is 1.0.
|
||||
*/
|
||||
'error_utilization_penalty'?: (_google_protobuf_FloatValue | null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration for the client_side_weighted_round_robin LB policy.
|
||||
*
|
||||
* This policy differs from the built-in ROUND_ROBIN policy in terms of
|
||||
* how the endpoint weights are determined. In the ROUND_ROBIN policy,
|
||||
* the endpoint weights are sent by the control plane via EDS. However,
|
||||
* in this policy, the endpoint weights are instead determined via qps (queries
|
||||
* per second), eps (errors per second), and utilization metrics sent by the
|
||||
* endpoint using the Open Request Cost Aggregation (ORCA) protocol. Utilization
|
||||
* is determined by using the ORCA application_utilization field, if set, or
|
||||
* else falling back to the cpu_utilization field. All queries count toward qps,
|
||||
* regardless of result. Only failed queries count toward eps. A config
|
||||
* parameter error_utilization_penalty controls the penalty to adjust endpoint
|
||||
* weights using eps and qps. The weight of a given endpoint is computed as:
|
||||
* qps / (utilization + eps/qps * error_utilization_penalty)
|
||||
*
|
||||
* See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.
|
||||
*
|
||||
* [#next-free-field: 7]
|
||||
*/
|
||||
export interface ClientSideWeightedRoundRobin__Output {
|
||||
/**
|
||||
* Whether to enable out-of-band utilization reporting collection from
|
||||
* the endpoints. By default, per-request utilization reporting is used.
|
||||
*/
|
||||
'enable_oob_load_report': (_google_protobuf_BoolValue__Output | null);
|
||||
/**
|
||||
* Load reporting interval to request from the server. Note that the
|
||||
* server may not provide reports as frequently as the client requests.
|
||||
* Used only when enable_oob_load_report is true. Default is 10 seconds.
|
||||
*/
|
||||
'oob_reporting_period': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* A given endpoint must report load metrics continuously for at least
|
||||
* this long before the endpoint weight will be used. This avoids
|
||||
* churn when the set of endpoint addresses changes. Takes effect
|
||||
* both immediately after we establish a connection to an endpoint and
|
||||
* after weight_expiration_period has caused us to stop using the most
|
||||
* recent load metrics. Default is 10 seconds.
|
||||
*/
|
||||
'blackout_period': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* If a given endpoint has not reported load metrics in this long,
|
||||
* then we stop using the reported weight. This ensures that we do
|
||||
* not continue to use very stale weights. Once we stop using a stale
|
||||
* value, if we later start seeing fresh reports again, the
|
||||
* blackout_period applies. Defaults to 3 minutes.
|
||||
*/
|
||||
'weight_expiration_period': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* How often endpoint weights are recalculated. Values less than 100ms are
|
||||
* capped at 100ms. Default is 1 second.
|
||||
*/
|
||||
'weight_update_period': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* The multiplier used to adjust endpoint weights with the error rate
|
||||
* calculated as eps/qps. Configuration is rejected if this value is negative.
|
||||
* Default is 1.0.
|
||||
*/
|
||||
'error_utilization_penalty': (_google_protobuf_FloatValue__Output | null);
|
||||
}
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { MigrateAnnotation as _udpa_annotations_MigrateAnnotation, MigrateAnnotation__Output as _udpa_annotations_MigrateAnnotation__Output } from '../../udpa/annotations/MigrateAnnotation';
|
||||
|
||||
export interface EnumOptions {
|
||||
'allowAlias'?: (boolean);
|
||||
@ -13,7 +12,6 @@ export interface EnumOptions {
|
||||
'deprecatedLegacyJsonFieldConflicts'?: (boolean);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.udpa.annotations.enum_migrate'?: (_udpa_annotations_MigrateAnnotation | null);
|
||||
}
|
||||
|
||||
export interface EnumOptions__Output {
|
||||
@ -25,5 +23,4 @@ export interface EnumOptions__Output {
|
||||
'deprecatedLegacyJsonFieldConflicts': (boolean);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.udpa.annotations.enum_migrate': (_udpa_annotations_MigrateAnnotation__Output | null);
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { _google_protobuf_FieldOptions_FeatureSupport, _google_protobuf_FieldOptions_FeatureSupport__Output } from '../../google/protobuf/FieldOptions';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { MigrateAnnotation as _udpa_annotations_MigrateAnnotation, MigrateAnnotation__Output as _udpa_annotations_MigrateAnnotation__Output } from '../../udpa/annotations/MigrateAnnotation';
|
||||
|
||||
export interface EnumValueOptions {
|
||||
'deprecated'?: (boolean);
|
||||
@ -11,9 +10,6 @@ export interface EnumValueOptions {
|
||||
'debugRedact'?: (boolean);
|
||||
'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.envoy.annotations.disallowed_by_default_enum'?: (boolean);
|
||||
'.udpa.annotations.enum_value_migrate'?: (_udpa_annotations_MigrateAnnotation | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version_enum'?: (string);
|
||||
}
|
||||
|
||||
export interface EnumValueOptions__Output {
|
||||
@ -22,7 +18,4 @@ export interface EnumValueOptions__Output {
|
||||
'debugRedact': (boolean);
|
||||
'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.envoy.annotations.disallowed_by_default_enum': (boolean);
|
||||
'.udpa.annotations.enum_value_migrate': (_udpa_annotations_MigrateAnnotation__Output | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version_enum': (string);
|
||||
}
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../../validate/FieldRules';
|
||||
import type { FieldMigrateAnnotation as _udpa_annotations_FieldMigrateAnnotation, FieldMigrateAnnotation__Output as _udpa_annotations_FieldMigrateAnnotation__Output } from '../../udpa/annotations/FieldMigrateAnnotation';
|
||||
import type { FieldStatusAnnotation as _xds_annotations_v3_FieldStatusAnnotation, FieldStatusAnnotation__Output as _xds_annotations_v3_FieldStatusAnnotation__Output } from '../../xds/annotations/v3/FieldStatusAnnotation';
|
||||
import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition';
|
||||
|
||||
// Original file: null
|
||||
@ -143,10 +141,6 @@ export interface FieldOptions {
|
||||
'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.rules'?: (_validate_FieldRules | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version'?: (string);
|
||||
'.udpa.annotations.field_migrate'?: (_udpa_annotations_FieldMigrateAnnotation | null);
|
||||
'.envoy.annotations.disallowed_by_default'?: (boolean);
|
||||
'.xds.annotations.v3.field_status'?: (_xds_annotations_v3_FieldStatusAnnotation | null);
|
||||
}
|
||||
|
||||
export interface FieldOptions__Output {
|
||||
@ -168,8 +162,4 @@ export interface FieldOptions__Output {
|
||||
'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.rules': (_validate_FieldRules__Output | null);
|
||||
'.envoy.annotations.deprecated_at_minor_version': (string);
|
||||
'.udpa.annotations.field_migrate': (_udpa_annotations_FieldMigrateAnnotation__Output | null);
|
||||
'.envoy.annotations.disallowed_by_default': (boolean);
|
||||
'.xds.annotations.v3.field_status': (_xds_annotations_v3_FieldStatusAnnotation__Output | null);
|
||||
}
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { FileMigrateAnnotation as _udpa_annotations_FileMigrateAnnotation, FileMigrateAnnotation__Output as _udpa_annotations_FileMigrateAnnotation__Output } from '../../udpa/annotations/FileMigrateAnnotation';
|
||||
import type { StatusAnnotation as _udpa_annotations_StatusAnnotation, StatusAnnotation__Output as _udpa_annotations_StatusAnnotation__Output } from '../../udpa/annotations/StatusAnnotation';
|
||||
import type { FileStatusAnnotation as _xds_annotations_v3_FileStatusAnnotation, FileStatusAnnotation__Output as _xds_annotations_v3_FileStatusAnnotation__Output } from '../../xds/annotations/v3/FileStatusAnnotation';
|
||||
|
||||
// Original file: null
|
||||
|
||||
@ -49,9 +47,7 @@ export interface FileOptions {
|
||||
'rubyPackage'?: (string);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.udpa.annotations.file_migrate'?: (_udpa_annotations_FileMigrateAnnotation | null);
|
||||
'.udpa.annotations.file_status'?: (_udpa_annotations_StatusAnnotation | null);
|
||||
'.xds.annotations.v3.file_status'?: (_xds_annotations_v3_FileStatusAnnotation | null);
|
||||
}
|
||||
|
||||
export interface FileOptions__Output {
|
||||
@ -79,7 +75,5 @@ export interface FileOptions__Output {
|
||||
'rubyPackage': (string);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.udpa.annotations.file_migrate': (_udpa_annotations_FileMigrateAnnotation__Output | null);
|
||||
'.udpa.annotations.file_status': (_udpa_annotations_StatusAnnotation__Output | null);
|
||||
'.xds.annotations.v3.file_status': (_xds_annotations_v3_FileStatusAnnotation__Output | null);
|
||||
}
|
||||
|
||||
@ -2,9 +2,6 @@
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { VersioningAnnotation as _udpa_annotations_VersioningAnnotation, VersioningAnnotation__Output as _udpa_annotations_VersioningAnnotation__Output } from '../../udpa/annotations/VersioningAnnotation';
|
||||
import type { MigrateAnnotation as _udpa_annotations_MigrateAnnotation, MigrateAnnotation__Output as _udpa_annotations_MigrateAnnotation__Output } from '../../udpa/annotations/MigrateAnnotation';
|
||||
import type { MessageStatusAnnotation as _xds_annotations_v3_MessageStatusAnnotation, MessageStatusAnnotation__Output as _xds_annotations_v3_MessageStatusAnnotation__Output } from '../../xds/annotations/v3/MessageStatusAnnotation';
|
||||
|
||||
export interface MessageOptions {
|
||||
'messageSetWireFormat'?: (boolean);
|
||||
@ -18,9 +15,6 @@ export interface MessageOptions {
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.disabled'?: (boolean);
|
||||
'.udpa.annotations.versioning'?: (_udpa_annotations_VersioningAnnotation | null);
|
||||
'.udpa.annotations.message_migrate'?: (_udpa_annotations_MigrateAnnotation | null);
|
||||
'.xds.annotations.v3.message_status'?: (_xds_annotations_v3_MessageStatusAnnotation | null);
|
||||
}
|
||||
|
||||
export interface MessageOptions__Output {
|
||||
@ -35,7 +29,4 @@ export interface MessageOptions__Output {
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.disabled': (boolean);
|
||||
'.udpa.annotations.versioning': (_udpa_annotations_VersioningAnnotation__Output | null);
|
||||
'.udpa.annotations.message_migrate': (_udpa_annotations_MigrateAnnotation__Output | null);
|
||||
'.xds.annotations.v3.message_status': (_xds_annotations_v3_MessageStatusAnnotation__Output | null);
|
||||
}
|
||||
|
||||
101
packages/grpc-js-xds/src/generated/typed_struct.ts
generated
101
packages/grpc-js-xds/src/generated/typed_struct.ts
generated
@ -1,58 +1,10 @@
|
||||
import type * as grpc from '@grpc/grpc-js';
|
||||
import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader';
|
||||
|
||||
import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from './google/protobuf/DescriptorProto';
|
||||
import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from './google/protobuf/Duration';
|
||||
import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from './google/protobuf/EnumDescriptorProto';
|
||||
import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from './google/protobuf/EnumOptions';
|
||||
import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from './google/protobuf/EnumValueDescriptorProto';
|
||||
import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from './google/protobuf/EnumValueOptions';
|
||||
import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from './google/protobuf/ExtensionRangeOptions';
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from './google/protobuf/FeatureSet';
|
||||
import type { FeatureSetDefaults as _google_protobuf_FeatureSetDefaults, FeatureSetDefaults__Output as _google_protobuf_FeatureSetDefaults__Output } from './google/protobuf/FeatureSetDefaults';
|
||||
import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from './google/protobuf/FieldDescriptorProto';
|
||||
import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from './google/protobuf/FieldOptions';
|
||||
import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from './google/protobuf/FileDescriptorProto';
|
||||
import type { FileDescriptorSet as _google_protobuf_FileDescriptorSet, FileDescriptorSet__Output as _google_protobuf_FileDescriptorSet__Output } from './google/protobuf/FileDescriptorSet';
|
||||
import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from './google/protobuf/FileOptions';
|
||||
import type { GeneratedCodeInfo as _google_protobuf_GeneratedCodeInfo, GeneratedCodeInfo__Output as _google_protobuf_GeneratedCodeInfo__Output } from './google/protobuf/GeneratedCodeInfo';
|
||||
import type { ListValue as _google_protobuf_ListValue, ListValue__Output as _google_protobuf_ListValue__Output } from './google/protobuf/ListValue';
|
||||
import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from './google/protobuf/MessageOptions';
|
||||
import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from './google/protobuf/MethodDescriptorProto';
|
||||
import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from './google/protobuf/MethodOptions';
|
||||
import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from './google/protobuf/OneofDescriptorProto';
|
||||
import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from './google/protobuf/OneofOptions';
|
||||
import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from './google/protobuf/ServiceDescriptorProto';
|
||||
import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from './google/protobuf/ServiceOptions';
|
||||
import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from './google/protobuf/SourceCodeInfo';
|
||||
import type { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from './google/protobuf/Struct';
|
||||
import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from './google/protobuf/Timestamp';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from './google/protobuf/UninterpretedOption';
|
||||
import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from './google/protobuf/Value';
|
||||
import type { TypedStruct as _udpa_type_v1_TypedStruct, TypedStruct__Output as _udpa_type_v1_TypedStruct__Output } from './udpa/type/v1/TypedStruct';
|
||||
import type { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from './validate/AnyRules';
|
||||
import type { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from './validate/BoolRules';
|
||||
import type { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from './validate/BytesRules';
|
||||
import type { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from './validate/DoubleRules';
|
||||
import type { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from './validate/DurationRules';
|
||||
import type { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from './validate/EnumRules';
|
||||
import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from './validate/FieldRules';
|
||||
import type { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from './validate/Fixed32Rules';
|
||||
import type { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from './validate/Fixed64Rules';
|
||||
import type { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from './validate/FloatRules';
|
||||
import type { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from './validate/Int32Rules';
|
||||
import type { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from './validate/Int64Rules';
|
||||
import type { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from './validate/MapRules';
|
||||
import type { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from './validate/MessageRules';
|
||||
import type { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from './validate/RepeatedRules';
|
||||
import type { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from './validate/SFixed32Rules';
|
||||
import type { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from './validate/SFixed64Rules';
|
||||
import type { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from './validate/SInt32Rules';
|
||||
import type { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from './validate/SInt64Rules';
|
||||
import type { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from './validate/StringRules';
|
||||
import type { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from './validate/TimestampRules';
|
||||
import type { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from './validate/UInt32Rules';
|
||||
import type { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from './validate/UInt64Rules';
|
||||
import type { TypedStruct as _xds_type_v3_TypedStruct, TypedStruct__Output as _xds_type_v3_TypedStruct__Output } from './xds/type/v3/TypedStruct';
|
||||
|
||||
type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype> = {
|
||||
@ -62,36 +14,9 @@ type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype>
|
||||
export interface ProtoGrpcType {
|
||||
google: {
|
||||
protobuf: {
|
||||
DescriptorProto: MessageTypeDefinition<_google_protobuf_DescriptorProto, _google_protobuf_DescriptorProto__Output>
|
||||
Duration: MessageTypeDefinition<_google_protobuf_Duration, _google_protobuf_Duration__Output>
|
||||
Edition: EnumTypeDefinition
|
||||
EnumDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumDescriptorProto, _google_protobuf_EnumDescriptorProto__Output>
|
||||
EnumOptions: MessageTypeDefinition<_google_protobuf_EnumOptions, _google_protobuf_EnumOptions__Output>
|
||||
EnumValueDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumValueDescriptorProto, _google_protobuf_EnumValueDescriptorProto__Output>
|
||||
EnumValueOptions: MessageTypeDefinition<_google_protobuf_EnumValueOptions, _google_protobuf_EnumValueOptions__Output>
|
||||
ExtensionRangeOptions: MessageTypeDefinition<_google_protobuf_ExtensionRangeOptions, _google_protobuf_ExtensionRangeOptions__Output>
|
||||
FeatureSet: MessageTypeDefinition<_google_protobuf_FeatureSet, _google_protobuf_FeatureSet__Output>
|
||||
FeatureSetDefaults: MessageTypeDefinition<_google_protobuf_FeatureSetDefaults, _google_protobuf_FeatureSetDefaults__Output>
|
||||
FieldDescriptorProto: MessageTypeDefinition<_google_protobuf_FieldDescriptorProto, _google_protobuf_FieldDescriptorProto__Output>
|
||||
FieldOptions: MessageTypeDefinition<_google_protobuf_FieldOptions, _google_protobuf_FieldOptions__Output>
|
||||
FileDescriptorProto: MessageTypeDefinition<_google_protobuf_FileDescriptorProto, _google_protobuf_FileDescriptorProto__Output>
|
||||
FileDescriptorSet: MessageTypeDefinition<_google_protobuf_FileDescriptorSet, _google_protobuf_FileDescriptorSet__Output>
|
||||
FileOptions: MessageTypeDefinition<_google_protobuf_FileOptions, _google_protobuf_FileOptions__Output>
|
||||
GeneratedCodeInfo: MessageTypeDefinition<_google_protobuf_GeneratedCodeInfo, _google_protobuf_GeneratedCodeInfo__Output>
|
||||
ListValue: MessageTypeDefinition<_google_protobuf_ListValue, _google_protobuf_ListValue__Output>
|
||||
MessageOptions: MessageTypeDefinition<_google_protobuf_MessageOptions, _google_protobuf_MessageOptions__Output>
|
||||
MethodDescriptorProto: MessageTypeDefinition<_google_protobuf_MethodDescriptorProto, _google_protobuf_MethodDescriptorProto__Output>
|
||||
MethodOptions: MessageTypeDefinition<_google_protobuf_MethodOptions, _google_protobuf_MethodOptions__Output>
|
||||
NullValue: EnumTypeDefinition
|
||||
OneofDescriptorProto: MessageTypeDefinition<_google_protobuf_OneofDescriptorProto, _google_protobuf_OneofDescriptorProto__Output>
|
||||
OneofOptions: MessageTypeDefinition<_google_protobuf_OneofOptions, _google_protobuf_OneofOptions__Output>
|
||||
ServiceDescriptorProto: MessageTypeDefinition<_google_protobuf_ServiceDescriptorProto, _google_protobuf_ServiceDescriptorProto__Output>
|
||||
ServiceOptions: MessageTypeDefinition<_google_protobuf_ServiceOptions, _google_protobuf_ServiceOptions__Output>
|
||||
SourceCodeInfo: MessageTypeDefinition<_google_protobuf_SourceCodeInfo, _google_protobuf_SourceCodeInfo__Output>
|
||||
Struct: MessageTypeDefinition<_google_protobuf_Struct, _google_protobuf_Struct__Output>
|
||||
SymbolVisibility: EnumTypeDefinition
|
||||
Timestamp: MessageTypeDefinition<_google_protobuf_Timestamp, _google_protobuf_Timestamp__Output>
|
||||
UninterpretedOption: MessageTypeDefinition<_google_protobuf_UninterpretedOption, _google_protobuf_UninterpretedOption__Output>
|
||||
Value: MessageTypeDefinition<_google_protobuf_Value, _google_protobuf_Value__Output>
|
||||
}
|
||||
}
|
||||
@ -102,32 +27,6 @@ export interface ProtoGrpcType {
|
||||
}
|
||||
}
|
||||
}
|
||||
validate: {
|
||||
AnyRules: MessageTypeDefinition<_validate_AnyRules, _validate_AnyRules__Output>
|
||||
BoolRules: MessageTypeDefinition<_validate_BoolRules, _validate_BoolRules__Output>
|
||||
BytesRules: MessageTypeDefinition<_validate_BytesRules, _validate_BytesRules__Output>
|
||||
DoubleRules: MessageTypeDefinition<_validate_DoubleRules, _validate_DoubleRules__Output>
|
||||
DurationRules: MessageTypeDefinition<_validate_DurationRules, _validate_DurationRules__Output>
|
||||
EnumRules: MessageTypeDefinition<_validate_EnumRules, _validate_EnumRules__Output>
|
||||
FieldRules: MessageTypeDefinition<_validate_FieldRules, _validate_FieldRules__Output>
|
||||
Fixed32Rules: MessageTypeDefinition<_validate_Fixed32Rules, _validate_Fixed32Rules__Output>
|
||||
Fixed64Rules: MessageTypeDefinition<_validate_Fixed64Rules, _validate_Fixed64Rules__Output>
|
||||
FloatRules: MessageTypeDefinition<_validate_FloatRules, _validate_FloatRules__Output>
|
||||
Int32Rules: MessageTypeDefinition<_validate_Int32Rules, _validate_Int32Rules__Output>
|
||||
Int64Rules: MessageTypeDefinition<_validate_Int64Rules, _validate_Int64Rules__Output>
|
||||
KnownRegex: EnumTypeDefinition
|
||||
MapRules: MessageTypeDefinition<_validate_MapRules, _validate_MapRules__Output>
|
||||
MessageRules: MessageTypeDefinition<_validate_MessageRules, _validate_MessageRules__Output>
|
||||
RepeatedRules: MessageTypeDefinition<_validate_RepeatedRules, _validate_RepeatedRules__Output>
|
||||
SFixed32Rules: MessageTypeDefinition<_validate_SFixed32Rules, _validate_SFixed32Rules__Output>
|
||||
SFixed64Rules: MessageTypeDefinition<_validate_SFixed64Rules, _validate_SFixed64Rules__Output>
|
||||
SInt32Rules: MessageTypeDefinition<_validate_SInt32Rules, _validate_SInt32Rules__Output>
|
||||
SInt64Rules: MessageTypeDefinition<_validate_SInt64Rules, _validate_SInt64Rules__Output>
|
||||
StringRules: MessageTypeDefinition<_validate_StringRules, _validate_StringRules__Output>
|
||||
TimestampRules: MessageTypeDefinition<_validate_TimestampRules, _validate_TimestampRules__Output>
|
||||
UInt32Rules: MessageTypeDefinition<_validate_UInt32Rules, _validate_UInt32Rules__Output>
|
||||
UInt64Rules: MessageTypeDefinition<_validate_UInt64Rules, _validate_UInt64Rules__Output>
|
||||
}
|
||||
xds: {
|
||||
type: {
|
||||
v3: {
|
||||
|
||||
@ -8,8 +8,8 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__
|
||||
*/
|
||||
export interface _xds_core_v3_CollectionEntry_InlineEntry {
|
||||
/**
|
||||
* Optional name to describe the inlined resource. Resource names must
|
||||
* [a-zA-Z0-9_-\./]+ (TODO(htuch): turn this into a PGV constraint once
|
||||
* Optional name to describe the inlined resource. Resource names must match
|
||||
* ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
|
||||
* finalized, probably should be a RFC3986 pchar). This name allows
|
||||
* reference via the #entry directive in ResourceLocator.
|
||||
*/
|
||||
@ -30,8 +30,8 @@ export interface _xds_core_v3_CollectionEntry_InlineEntry {
|
||||
*/
|
||||
export interface _xds_core_v3_CollectionEntry_InlineEntry__Output {
|
||||
/**
|
||||
* Optional name to describe the inlined resource. Resource names must
|
||||
* [a-zA-Z0-9_-\./]+ (TODO(htuch): turn this into a PGV constraint once
|
||||
* Optional name to describe the inlined resource. Resource names must match
|
||||
* ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
|
||||
* finalized, probably should be a RFC3986 pchar). This name allows
|
||||
* reference via the #entry directive in ResourceLocator.
|
||||
*/
|
||||
@ -52,6 +52,8 @@ export interface _xds_core_v3_CollectionEntry_InlineEntry__Output {
|
||||
* appearing inside a list collection resource. List collection resources are
|
||||
* regular Resource messages of type:
|
||||
*
|
||||
* .. code-block:: proto
|
||||
*
|
||||
* message <T>Collection {
|
||||
* repeated CollectionEntry resources = 1;
|
||||
* }
|
||||
@ -73,6 +75,8 @@ export interface CollectionEntry {
|
||||
* appearing inside a list collection resource. List collection resources are
|
||||
* regular Resource messages of type:
|
||||
*
|
||||
* .. code-block:: proto
|
||||
*
|
||||
* message <T>Collection {
|
||||
* repeated CollectionEntry resources = 1;
|
||||
* }
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* global context parameters, per-resource type client feature capabilities and per-resource
|
||||
* type functional attributes. All per-resource type attributes will be `xds.resource.`
|
||||
* prefixed and some of these are documented below:
|
||||
*
|
||||
* `xds.resource.listening_address`: The value is "IP:port" (e.g. "10.1.1.3:8080") which is
|
||||
* the listening address of a Listener. Used in a Listener resource query.
|
||||
*/
|
||||
@ -18,6 +19,7 @@ export interface ContextParams {
|
||||
* global context parameters, per-resource type client feature capabilities and per-resource
|
||||
* type functional attributes. All per-resource type attributes will be `xds.resource.`
|
||||
* prefixed and some of these are documented below:
|
||||
*
|
||||
* `xds.resource.listening_address`: The value is "IP:port" (e.g. "10.1.1.3:8080") which is
|
||||
* the listening address of a Listener. Used in a Listener resource query.
|
||||
*/
|
||||
|
||||
@ -271,10 +271,9 @@ export interface Matcher {
|
||||
*/
|
||||
'matcher_tree'?: (_xds_type_matcher_v3_Matcher_MatcherTree | null);
|
||||
/**
|
||||
* Optional OnMatch to use if the matcher failed.
|
||||
* If specified, the OnMatch is used, and the matcher is considered
|
||||
* to have matched.
|
||||
* If not specified, the matcher is considered not to have matched.
|
||||
* Optional OnMatch to use if no matcher above matched (e.g., if there are no matchers specified
|
||||
* above, or if none of the matches specified above succeeded).
|
||||
* If no matcher above matched and this field is not populated, the match will be considered unsuccessful.
|
||||
*/
|
||||
'on_no_match'?: (_xds_type_matcher_v3_Matcher_OnMatch | null);
|
||||
'matcher_type'?: "matcher_list"|"matcher_tree";
|
||||
@ -297,10 +296,9 @@ export interface Matcher__Output {
|
||||
*/
|
||||
'matcher_tree'?: (_xds_type_matcher_v3_Matcher_MatcherTree__Output | null);
|
||||
/**
|
||||
* Optional OnMatch to use if the matcher failed.
|
||||
* If specified, the OnMatch is used, and the matcher is considered
|
||||
* to have matched.
|
||||
* If not specified, the matcher is considered not to have matched.
|
||||
* Optional OnMatch to use if no matcher above matched (e.g., if there are no matchers specified
|
||||
* above, or if none of the matches specified above succeeded).
|
||||
* If no matcher above matched and this field is not populated, the match will be considered unsuccessful.
|
||||
*/
|
||||
'on_no_match': (_xds_type_matcher_v3_Matcher_OnMatch__Output | null);
|
||||
'matcher_type'?: "matcher_list"|"matcher_tree";
|
||||
|
||||
@ -13,6 +13,7 @@ import type { Struct as _google_protobuf_Struct, Struct__Output as _google_proto
|
||||
* When packing an opaque extension config, packing the expected type into Any is preferred
|
||||
* wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor
|
||||
* is not available, for example if:
|
||||
*
|
||||
* - A control plane sends opaque message that is originally from external source in human readable
|
||||
* format such as JSON or YAML.
|
||||
* - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot
|
||||
@ -23,6 +24,7 @@ import type { Struct as _google_protobuf_Struct, Struct__Output as _google_proto
|
||||
* When a DPLB receives a TypedStruct in Any, it should:
|
||||
* - Check if the type_url of the TypedStruct matches the type the extension expects.
|
||||
* - Convert value to the type described in type_url and perform validation.
|
||||
*
|
||||
* TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link
|
||||
* protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions).
|
||||
*/
|
||||
@ -50,6 +52,7 @@ export interface TypedStruct {
|
||||
* When packing an opaque extension config, packing the expected type into Any is preferred
|
||||
* wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor
|
||||
* is not available, for example if:
|
||||
*
|
||||
* - A control plane sends opaque message that is originally from external source in human readable
|
||||
* format such as JSON or YAML.
|
||||
* - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot
|
||||
@ -60,6 +63,7 @@ export interface TypedStruct {
|
||||
* When a DPLB receives a TypedStruct in Any, it should:
|
||||
* - Check if the type_url of the TypedStruct matches the type the extension expects.
|
||||
* - Convert value to the type described in type_url and perform validation.
|
||||
*
|
||||
* TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link
|
||||
* protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions).
|
||||
*/
|
||||
|
||||
@ -30,6 +30,8 @@ import * as csds from './csds';
|
||||
import * as round_robin_lb from './lb-policy-registry/round-robin';
|
||||
import * as typed_struct_lb from './lb-policy-registry/typed-struct';
|
||||
import * as pick_first_lb from './lb-policy-registry/pick-first';
|
||||
import * as weighted_round_robin_lb from './lb-policy-registry/weighted-round-robin';
|
||||
import * as wrr_locality from './lb-policy-registry/wrr-locality';
|
||||
|
||||
export { XdsServer } from './server';
|
||||
export { XdsChannelCredentials, XdsServerCredentials } from './xds-credentials';
|
||||
@ -59,4 +61,6 @@ export function register() {
|
||||
round_robin_lb.setup();
|
||||
typed_struct_lb.setup();
|
||||
pick_first_lb.setup();
|
||||
weighted_round_robin_lb.setup();
|
||||
wrr_locality.setup();
|
||||
}
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright 2025 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
import { LoadBalancingConfig } from "@grpc/grpc-js";
|
||||
import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v3/LoadBalancingPolicy";
|
||||
import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig";
|
||||
import { loadProtosWithOptionsSync } from "@grpc/proto-loader/build/src/util";
|
||||
import { Any__Output } from "../generated/google/protobuf/Any";
|
||||
import { ClientSideWeightedRoundRobin__Output } from "../generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/ClientSideWeightedRoundRobin";
|
||||
import { EXPERIMENTAL_WRR_LB } from "../environment";
|
||||
import { registerLbPolicy } from "../lb-policy-registry";
|
||||
|
||||
const WEIGHTED_ROUND_ROBIN_TYPE_URL = 'type.googleapis.com/envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin';
|
||||
|
||||
const resourceRoot = loadProtosWithOptionsSync([
|
||||
'envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto'], {
|
||||
keepCase: true,
|
||||
includeDirs: [
|
||||
// Paths are relative to src/build/lb-policy-registry
|
||||
__dirname + '/../../../deps/envoy-api/',
|
||||
__dirname + '/../../../deps/xds/',
|
||||
__dirname + '/../../../deps/protoc-gen-validate'
|
||||
],
|
||||
}
|
||||
);
|
||||
|
||||
const toObjectOptions = {
|
||||
longs: String,
|
||||
enums: String,
|
||||
defaults: true,
|
||||
oneofs: true
|
||||
};
|
||||
|
||||
function decodeWeightedRoundRobinConfig(message: Any__Output): ClientSideWeightedRoundRobin__Output {
|
||||
const name = message.type_url.substring(message.type_url.lastIndexOf('/') + 1);
|
||||
const type = resourceRoot.lookup(name);
|
||||
if (type) {
|
||||
const decodedMessage = (type as any).decode(message.value);
|
||||
return decodedMessage.$type.toObject(decodedMessage, toObjectOptions) as ClientSideWeightedRoundRobin__Output;
|
||||
} else {
|
||||
throw new Error(`TypedStruct parsing error: unexpected type URL ${message.type_url}`);
|
||||
}
|
||||
}
|
||||
|
||||
function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig | null {
|
||||
if (protoPolicy.typed_config?.type_url !== WEIGHTED_ROUND_ROBIN_TYPE_URL) {
|
||||
throw new Error(`Pick first LB policy parsing error: unexpected type URL ${protoPolicy.typed_config?.type_url}`);
|
||||
}
|
||||
const wrrMessage = decodeWeightedRoundRobinConfig(protoPolicy.typed_config);
|
||||
return {
|
||||
weighted_round_robin: {
|
||||
enable_oob_load_report: wrrMessage.enable_oob_load_report?.value,
|
||||
oob_load_reporting_period: wrrMessage.oob_reporting_period,
|
||||
blackout_period: wrrMessage.blackout_period,
|
||||
weight_expiration_period: wrrMessage.weight_expiration_period,
|
||||
weight_update_period: wrrMessage.weight_update_period,
|
||||
error_utilization_penalty: wrrMessage.error_utilization_penalty?.value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function setup() {
|
||||
if (EXPERIMENTAL_WRR_LB) {
|
||||
registerLbPolicy(WEIGHTED_ROUND_ROBIN_TYPE_URL, convertToLoadBalancingPolicy);
|
||||
}
|
||||
}
|
||||
75
packages/grpc-js-xds/src/lb-policy-registry/wrr-locality.ts
Normal file
75
packages/grpc-js-xds/src/lb-policy-registry/wrr-locality.ts
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright 2025 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
import { LoadBalancingConfig } from "@grpc/grpc-js";
|
||||
import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v3/LoadBalancingPolicy";
|
||||
import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig";
|
||||
import { loadProtosWithOptionsSync } from "@grpc/proto-loader/build/src/util";
|
||||
import { Any__Output } from "../generated/google/protobuf/Any";
|
||||
import { registerLbPolicy } from "../lb-policy-registry";
|
||||
import { WrrLocality__Output } from "../generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/WrrLocality";
|
||||
|
||||
const WRR_LOCALITY_TYPE_URL = 'envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality';
|
||||
|
||||
const resourceRoot = loadProtosWithOptionsSync([
|
||||
'envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto'], {
|
||||
keepCase: true,
|
||||
includeDirs: [
|
||||
// Paths are relative to src/build/lb-policy-registry
|
||||
__dirname + '/../../../deps/envoy-api/',
|
||||
__dirname + '/../../../deps/xds/',
|
||||
__dirname + '/../../../deps/protoc-gen-validate'
|
||||
],
|
||||
}
|
||||
);
|
||||
|
||||
const toObjectOptions = {
|
||||
longs: String,
|
||||
enums: String,
|
||||
defaults: true,
|
||||
oneofs: true
|
||||
}
|
||||
|
||||
function decodePickFirstConfig(message: Any__Output): WrrLocality__Output {
|
||||
const name = message.type_url.substring(message.type_url.lastIndexOf('/') + 1);
|
||||
const type = resourceRoot.lookup(name);
|
||||
if (type) {
|
||||
const decodedMessage = (type as any).decode(message.value);
|
||||
return decodedMessage.$type.toObject(decodedMessage, toObjectOptions) as WrrLocality__Output;
|
||||
} else {
|
||||
throw new Error(`WRR Locality parsing error: unexpected type URL ${message.type_url}`);
|
||||
}
|
||||
}
|
||||
|
||||
function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig | null {
|
||||
if (protoPolicy.typed_config?.type_url !== WRR_LOCALITY_TYPE_URL) {
|
||||
throw new Error(`WRR Locality LB policy parsing error: unexpected type URL ${protoPolicy.typed_config?.type_url}`);
|
||||
}
|
||||
const wrrLocalityMessage = decodePickFirstConfig(protoPolicy.typed_config);
|
||||
if (!wrrLocalityMessage.endpoint_picking_policy) {
|
||||
throw new Error('WRR Locality LB policy parsing error: no endpoint_picking_policy set');
|
||||
}
|
||||
return {
|
||||
wrr_locality: {
|
||||
shuffleAddressList: selectChildPolicy(wrrLocalityMessage.endpoint_picking_policy)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function setup() {
|
||||
registerLbPolicy(WRR_LOCALITY_TYPE_URL, convertToLoadBalancingPolicy);
|
||||
}
|
||||
@ -173,14 +173,14 @@ class XdsClusterImplPicker implements Picker {
|
||||
return {
|
||||
pickResultType: originalPick.pickResultType,
|
||||
status: originalPick.status,
|
||||
subchannel: pickSubchannel?.getWrappedSubchannel() ?? null,
|
||||
subchannel: pickSubchannel?.getWrappedSubchannel?.() ?? null,
|
||||
onCallStarted: () => {
|
||||
originalPick.onCallStarted?.();
|
||||
pickSubchannel?.getStatsObject()?.addCallStarted();
|
||||
callCounterMap.startCall(this.callCounterMapKey);
|
||||
},
|
||||
onCallEnded: status => {
|
||||
originalPick.onCallEnded?.(status);
|
||||
onCallEnded: (status, details, metadata) => {
|
||||
originalPick.onCallEnded?.(status, details, metadata);
|
||||
pickSubchannel?.getStatsObject()?.addCallFinished(status !== Status.OK)
|
||||
callCounterMap.endCall(this.callCounterMapKey);
|
||||
}
|
||||
|
||||
@ -21,11 +21,9 @@ import { ProtoGrpcType } from "./generated/echo";
|
||||
import { EchoRequest__Output } from "./generated/grpc/testing/EchoRequest";
|
||||
import { EchoResponse } from "./generated/grpc/testing/EchoResponse";
|
||||
|
||||
import * as net from 'net';
|
||||
import { XdsServer } from "../src";
|
||||
import { ControlPlaneServer } from "./xds-server";
|
||||
import { findFreePorts } from 'find-free-ports';
|
||||
import { XdsServerCredentials } from "../src/xds-credentials";
|
||||
import { getPortsPromise } from 'portfinder';
|
||||
|
||||
const loadedProtos = loadPackageDefinition(loadSync(
|
||||
[
|
||||
@ -148,6 +146,6 @@ export class Backend {
|
||||
}
|
||||
|
||||
export async function createBackends(count: number, useXdsServer?: boolean, creds?: ServerCredentials | undefined, serverOptions?: ServerOptions): Promise<Backend[]> {
|
||||
const ports = await findFreePorts(count);
|
||||
const ports = await getPortsPromise(count);
|
||||
return ports.map(port => new Backend(port, useXdsServer ?? true, creds, serverOptions));
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ import parseLoadBalancingConfig = experimental.parseLoadBalancingConfig;
|
||||
import registerLoadBalancerType = experimental.registerLoadBalancerType;
|
||||
import StatusOr = experimental.StatusOr;
|
||||
import { PickFirst } from "../src/generated/envoy/extensions/load_balancing_policies/pick_first/v3/PickFirst";
|
||||
import { ClientSideWeightedRoundRobin } from "../src/generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/ClientSideWeightedRoundRobin";
|
||||
|
||||
const LB_POLICY_NAME = 'test.RpcBehaviorLoadBalancer';
|
||||
|
||||
@ -344,5 +345,70 @@ describe('Custom LB policies', () => {
|
||||
const error = await client.sendOneCallAsync();
|
||||
assert.strictEqual(error, null);
|
||||
});
|
||||
|
||||
it('Should handle weighted_round_robin', async () => {
|
||||
const lbPolicy: ClientSideWeightedRoundRobin & AnyExtension = {
|
||||
'@type': 'type.googleapis.com/envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin',
|
||||
enable_oob_load_report: { value: true },
|
||||
oob_reporting_period: { seconds: 1 },
|
||||
blackout_period: { seconds: 1 },
|
||||
weight_expiration_period: { seconds: 1 },
|
||||
weight_update_period: { seconds: 1 },
|
||||
error_utilization_penalty: { value: 0.5 }
|
||||
};
|
||||
xdsServer.addResponseListener((typeUrl, responseState) => {
|
||||
if (responseState.state === 'NACKED') {
|
||||
client?.stopCalls();
|
||||
assert.fail(`Client NACKED ${typeUrl} resource with message ${responseState.errorMessage}`);
|
||||
}
|
||||
});
|
||||
const [backend] = await createBackends(1);
|
||||
const serverRoute = new FakeServerRoute(backend.getPort(), 'serverRoute');
|
||||
xdsServer.setRdsResource(serverRoute.getRouteConfiguration());
|
||||
xdsServer.setLdsResource(serverRoute.getListener());
|
||||
const cluster = new FakeEdsCluster('cluster1', 'endpoint1', [{backends: [backend], locality:{region: 'region1'}}], lbPolicy);
|
||||
const routeGroup = new FakeRouteGroup('listener1', 'route1', [{cluster: cluster}]);
|
||||
xdsServer.setEdsResource(cluster.getEndpointConfig());
|
||||
xdsServer.setCdsResource(cluster.getClusterConfig());
|
||||
xdsServer.setRdsResource(routeGroup.getRouteConfiguration());
|
||||
xdsServer.setLdsResource(routeGroup.getListener());
|
||||
await routeGroup.startAllBackends(xdsServer);
|
||||
client = XdsTestClient.createFromServer('listener1', xdsServer);
|
||||
const error = await client.sendOneCallAsync();
|
||||
assert.strictEqual(error, null);
|
||||
});
|
||||
it('Should distribute traffic among backends with weighted_round_robin', async () => {
|
||||
const lbPolicy: ClientSideWeightedRoundRobin & AnyExtension = {
|
||||
'@type': 'type.googleapis.com/envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin',
|
||||
enable_oob_load_report: { value: true },
|
||||
oob_reporting_period: { seconds: 1 },
|
||||
blackout_period: { seconds: 1 },
|
||||
weight_expiration_period: { seconds: 1 },
|
||||
weight_update_period: { seconds: 1 },
|
||||
error_utilization_penalty: { value: 0.5 }
|
||||
};
|
||||
xdsServer.addResponseListener((typeUrl, responseState) => {
|
||||
if (responseState.state === 'NACKED') {
|
||||
client?.stopCalls();
|
||||
assert.fail(`Client NACKED ${typeUrl} resource with message ${responseState.errorMessage}`);
|
||||
}
|
||||
});
|
||||
const [backend1, backend2] = await createBackends(2);
|
||||
const serverRoute1 = new FakeServerRoute(backend1.getPort(), 'serverRoute');
|
||||
const serverRoute2 = new FakeServerRoute(backend2.getPort(), 'serverRoute2');
|
||||
xdsServer.setRdsResource(serverRoute1.getRouteConfiguration());
|
||||
xdsServer.setLdsResource(serverRoute1.getListener());
|
||||
xdsServer.setRdsResource(serverRoute2.getRouteConfiguration());
|
||||
xdsServer.setLdsResource(serverRoute2.getListener());
|
||||
const cluster = new FakeEdsCluster('cluster1', 'endpoint1', [{backends: [backend1, backend2], locality:{region: 'region1'}}], lbPolicy);
|
||||
const routeGroup = new FakeRouteGroup('listener1', 'route1', [{cluster: cluster}]);
|
||||
xdsServer.setEdsResource(cluster.getEndpointConfig());
|
||||
xdsServer.setCdsResource(cluster.getClusterConfig());
|
||||
xdsServer.setRdsResource(routeGroup.getRouteConfiguration());
|
||||
xdsServer.setLdsResource(routeGroup.getListener());
|
||||
await routeGroup.startAllBackends(xdsServer);
|
||||
client = XdsTestClient.createFromServer('listener1', xdsServer);
|
||||
client.startCalls(100);
|
||||
await routeGroup.waitForAllBackendsToReceiveTraffic();
|
||||
client.stopCalls();
|
||||
});
|
||||
});
|
||||
|
||||
@ -24,7 +24,7 @@ import { AnyExtension } from '@grpc/proto-loader';
|
||||
import { RBAC } from '../src/generated/envoy/extensions/filters/http/rbac/v3/RBAC';
|
||||
import { status } from '@grpc/grpc-js';
|
||||
|
||||
describe.only('RBAC HTTP filter', () => {
|
||||
describe('RBAC HTTP filter', () => {
|
||||
let xdsServer: ControlPlaneServer;
|
||||
let client: XdsTestClient;
|
||||
beforeEach(done => {
|
||||
|
||||
@ -53,6 +53,7 @@ const loadedProtos = loadPackageDefinition(loadSync(
|
||||
'envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto',
|
||||
'envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto',
|
||||
'envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto',
|
||||
'envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto',
|
||||
'envoy/extensions/transport_sockets/tls/v3/tls.proto',
|
||||
'xds/type/v3/typed_struct.proto',
|
||||
'envoy/extensions/filters/http/router/v3/router.proto',
|
||||
|
||||
31
packages/grpc-js/copy-protos.js
Normal file
31
packages/grpc-js/copy-protos.js
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2025 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copy xDS protos that are needed for ORCA into this directory.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
fs.mkdirSync(__dirname + '/proto/protoc-gen-validate/validate', { recursive: true });
|
||||
fs.mkdirSync(__dirname + '/proto/xds/xds/data/orca/v3', { recursive: true });
|
||||
fs.mkdirSync(__dirname + '/proto/xds/xds/service/orca/v3', { recursive: true });
|
||||
fs.copyFileSync(__dirname + '/../grpc-js-xds/deps/protoc-gen-validate/LICENSE', __dirname + '/proto/protoc-gen-validate/LICENSE');
|
||||
fs.copyFileSync(__dirname + '/../grpc-js-xds/deps/protoc-gen-validate/validate/validate.proto', __dirname + '/proto/protoc-gen-validate/validate/validate.proto');
|
||||
fs.copyFileSync(__dirname + '/../grpc-js-xds/deps/xds/LICENSE', __dirname + '/proto/xds/LICENSE')
|
||||
fs.copyFileSync(__dirname + '/../grpc-js-xds/deps/xds/xds/data/orca/v3/orca_load_report.proto', __dirname + '/proto/xds/xds/data/orca/v3/orca_load_report.proto');
|
||||
fs.copyFileSync(__dirname + '/../grpc-js-xds/deps/xds/xds/service/orca/v3/orca.proto', __dirname + '/proto/xds/xds/service/orca/v3/orca.proto');
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@grpc/grpc-js",
|
||||
"version": "1.13.0",
|
||||
"version": "1.13.4",
|
||||
"description": "gRPC Library for Node - pure JS implementation",
|
||||
"homepage": "https://grpc.io/",
|
||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||
@ -57,23 +57,25 @@
|
||||
"compile": "tsc -p .",
|
||||
"format": "clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts",
|
||||
"lint": "eslint src/*.ts test/*.ts",
|
||||
"prepare": "npm run generate-types && npm run generate-test-types && npm run compile",
|
||||
"prepare": "npm run copy-protos && npm run generate-types && npm run generate-test-types && npm run compile",
|
||||
"test": "gulp test",
|
||||
"check": "npm run lint",
|
||||
"fix": "eslint --fix src/*.ts test/*.ts",
|
||||
"pretest": "npm run generate-types && npm run generate-test-types && npm run compile",
|
||||
"posttest": "npm run check && madge -c ./build/src",
|
||||
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs test/fixtures/ -O src/generated/ --grpcLib ../index channelz.proto",
|
||||
"generate-test-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto"
|
||||
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs proto/ proto/xds/ proto/protoc-gen-validate/ -O src/generated/ --grpcLib ../index channelz.proto xds/service/orca/v3/orca.proto",
|
||||
"generate-test-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto echo_service.proto",
|
||||
"copy-protos": "node ./copy-protos"
|
||||
},
|
||||
"dependencies": {
|
||||
"@grpc/proto-loader": "^0.7.13",
|
||||
"@grpc/proto-loader": "^0.8.0",
|
||||
"@js-sdsl/ordered-map": "^4.4.2"
|
||||
},
|
||||
"files": [
|
||||
"src/**/*.ts",
|
||||
"build/src/**/*.{js,d.ts,js.map}",
|
||||
"proto/*.proto",
|
||||
"proto/**/*.proto",
|
||||
"proto/**/LICENSE",
|
||||
"LICENSE",
|
||||
"deps/envoy-api/envoy/api/v2/**/*.proto",
|
||||
"deps/envoy-api/envoy/config/**/*.proto",
|
||||
|
||||
@ -15,6 +15,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import { LogVerbosity } from './constants';
|
||||
import * as logging from './logging';
|
||||
|
||||
const TRACER_NAME = 'backoff';
|
||||
|
||||
const INITIAL_BACKOFF_MS = 1000;
|
||||
const BACKOFF_MULTIPLIER = 1.6;
|
||||
const MAX_BACKOFF_MS = 120000;
|
||||
@ -84,7 +89,12 @@ export class BackoffTimeout {
|
||||
*/
|
||||
private endTime: Date = new Date();
|
||||
|
||||
private id: number;
|
||||
|
||||
private static nextId = 0;
|
||||
|
||||
constructor(private callback: () => void, options?: BackoffOptions) {
|
||||
this.id = BackoffTimeout.getNextId();
|
||||
if (options) {
|
||||
if (options.initialDelay) {
|
||||
this.initialDelay = options.initialDelay;
|
||||
@ -99,20 +109,31 @@ export class BackoffTimeout {
|
||||
this.maxDelay = options.maxDelay;
|
||||
}
|
||||
}
|
||||
this.trace('constructed initialDelay=' + this.initialDelay + ' multiplier=' + this.multiplier + ' jitter=' + this.jitter + ' maxDelay=' + this.maxDelay);
|
||||
this.nextDelay = this.initialDelay;
|
||||
this.timerId = setTimeout(() => {}, 0);
|
||||
clearTimeout(this.timerId);
|
||||
}
|
||||
|
||||
private static getNextId() {
|
||||
return this.nextId++;
|
||||
}
|
||||
|
||||
private trace(text: string) {
|
||||
logging.trace(LogVerbosity.DEBUG, TRACER_NAME, '{' + this.id + '} ' + text);
|
||||
}
|
||||
|
||||
private runTimer(delay: number) {
|
||||
this.trace('runTimer(delay=' + delay + ')');
|
||||
this.endTime = this.startTime;
|
||||
this.endTime.setMilliseconds(
|
||||
this.endTime.getMilliseconds() + delay
|
||||
);
|
||||
clearTimeout(this.timerId);
|
||||
this.timerId = setTimeout(() => {
|
||||
this.callback();
|
||||
this.trace('timer fired');
|
||||
this.running = false;
|
||||
this.callback();
|
||||
}, delay);
|
||||
if (!this.hasRef) {
|
||||
this.timerId.unref?.();
|
||||
@ -123,6 +144,7 @@ export class BackoffTimeout {
|
||||
* Call the callback after the current amount of delay time
|
||||
*/
|
||||
runOnce() {
|
||||
this.trace('runOnce()');
|
||||
this.running = true;
|
||||
this.startTime = new Date();
|
||||
this.runTimer(this.nextDelay);
|
||||
@ -140,6 +162,7 @@ export class BackoffTimeout {
|
||||
* again.
|
||||
*/
|
||||
stop() {
|
||||
this.trace('stop()');
|
||||
clearTimeout(this.timerId);
|
||||
this.running = false;
|
||||
}
|
||||
@ -149,6 +172,7 @@ export class BackoffTimeout {
|
||||
* retroactively apply that reset to the current timer.
|
||||
*/
|
||||
reset() {
|
||||
this.trace('reset() running=' + this.running);
|
||||
this.nextDelay = this.initialDelay;
|
||||
if (this.running) {
|
||||
const now = new Date();
|
||||
|
||||
@ -206,6 +206,18 @@ function getConnectionOptions(secureContext: SecureContext, verifyOptions: Verif
|
||||
const connectionOptions: ConnectionOptions = {
|
||||
secureContext: secureContext
|
||||
};
|
||||
let realTarget: GrpcUri = channelTarget;
|
||||
if ('grpc.http_connect_target' in options) {
|
||||
const parsedTarget = parseUri(options['grpc.http_connect_target']!);
|
||||
if (parsedTarget) {
|
||||
realTarget = parsedTarget;
|
||||
}
|
||||
}
|
||||
const targetPath = getDefaultAuthority(realTarget);
|
||||
const hostPort = splitHostPort(targetPath);
|
||||
const remoteHost = hostPort?.host ?? targetPath;
|
||||
connectionOptions.host = remoteHost;
|
||||
|
||||
if (verifyOptions.checkServerIdentity) {
|
||||
connectionOptions.checkServerIdentity = verifyOptions.checkServerIdentity;
|
||||
}
|
||||
@ -225,36 +237,11 @@ function getConnectionOptions(secureContext: SecureContext, verifyOptions: Verif
|
||||
};
|
||||
connectionOptions.servername = sslTargetNameOverride;
|
||||
} else {
|
||||
if ('grpc.http_connect_target' in options) {
|
||||
/* This is more or less how servername will be set in createSession
|
||||
* if a connection is successfully established through the proxy.
|
||||
* If the proxy is not used, these connectionOptions are discarded
|
||||
* anyway */
|
||||
const targetPath = getDefaultAuthority(
|
||||
parseUri(options['grpc.http_connect_target'] as string) ?? {
|
||||
path: 'localhost',
|
||||
}
|
||||
);
|
||||
const hostPort = splitHostPort(targetPath);
|
||||
connectionOptions.servername = hostPort?.host ?? targetPath;
|
||||
}
|
||||
connectionOptions.servername = remoteHost;
|
||||
}
|
||||
if (options['grpc-node.tls_enable_trace']) {
|
||||
connectionOptions.enableTrace = true;
|
||||
}
|
||||
|
||||
let realTarget: GrpcUri = channelTarget;
|
||||
if ('grpc.http_connect_target' in options) {
|
||||
const parsedTarget = parseUri(options['grpc.http_connect_target']!);
|
||||
if (parsedTarget) {
|
||||
realTarget = parsedTarget;
|
||||
}
|
||||
}
|
||||
const targetPath = getDefaultAuthority(realTarget);
|
||||
const hostPort = splitHostPort(targetPath);
|
||||
const remoteHost = hostPort?.host ?? targetPath;
|
||||
connectionOptions.host = remoteHost;
|
||||
connectionOptions.servername = remoteHost;
|
||||
return connectionOptions;
|
||||
}
|
||||
|
||||
@ -268,7 +255,7 @@ class SecureConnectorImpl implements SecureConnector {
|
||||
};
|
||||
return new Promise<SecureConnectResult>((resolve, reject) => {
|
||||
const tlsSocket = tlsConnect(tlsConnectOptions, () => {
|
||||
if (!tlsSocket.authorized) {
|
||||
if ((this.connectionOptions.rejectUnauthorized ?? true) && !tlsSocket.authorized) {
|
||||
reject(tlsSocket.authorizationError);
|
||||
return;
|
||||
}
|
||||
@ -364,7 +351,7 @@ class CertificateProviderChannelCredentialsImpl extends ChannelCredentials {
|
||||
const tlsSocket = tlsConnect(tlsConnectOptions, () => {
|
||||
tlsSocket.removeListener('close', closeCallback);
|
||||
tlsSocket.removeListener('error', errorCallback);
|
||||
if (!tlsSocket.authorized) {
|
||||
if ((this.parent.verifyOptions.rejectUnauthorized ?? true) && !tlsSocket.authorized) {
|
||||
reject(tlsSocket.authorizationError);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ export interface ChannelOptions {
|
||||
'grpc.max_send_message_length'?: number;
|
||||
'grpc.max_receive_message_length'?: number;
|
||||
'grpc.enable_http_proxy'?: number;
|
||||
'grpc.http_proxy'?: string;
|
||||
/* http_connect_target and http_connect_creds are used for passing data
|
||||
* around internally, and should not be documented as public-facing options
|
||||
*/
|
||||
@ -65,6 +66,7 @@ export interface ChannelOptions {
|
||||
'grpc.lb.ring_hash.ring_size_cap'?: number;
|
||||
'grpc-node.retry_max_attempts_limit'?: number;
|
||||
'grpc-node.flow_control_window'?: number;
|
||||
'grpc.server_call_metric_recording'?: number;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
[key: string]: any;
|
||||
}
|
||||
@ -103,6 +105,7 @@ export const recognizedOptions = {
|
||||
'grpc.lb.ring_hash.ring_size_cap': true,
|
||||
'grpc-node.retry_max_attempts_limit': true,
|
||||
'grpc-node.flow_control_window': true,
|
||||
'grpc.server_call_metric_recording': true
|
||||
};
|
||||
|
||||
export function channelOptionsEqual(
|
||||
|
||||
@ -65,7 +65,7 @@ abstract class CompressionHandler {
|
||||
*/
|
||||
async readMessage(data: Buffer): Promise<Buffer> {
|
||||
const compressed = data.readUInt8(0) === 1;
|
||||
let messageBuffer = data.slice(5);
|
||||
let messageBuffer: Buffer<ArrayBufferLike> = data.slice(5);
|
||||
if (compressed) {
|
||||
messageBuffer = await this.decompressMessage(messageBuffer);
|
||||
}
|
||||
|
||||
@ -20,6 +20,18 @@ export interface Duration {
|
||||
nanos: number;
|
||||
}
|
||||
|
||||
export interface DurationMessage {
|
||||
seconds: string;
|
||||
nanos: number;
|
||||
}
|
||||
|
||||
export function durationMessageToDuration(message: DurationMessage): Duration {
|
||||
return {
|
||||
seconds: Number.parseInt(message.seconds),
|
||||
nanos: message.nanos
|
||||
};
|
||||
}
|
||||
|
||||
export function msToDuration(millis: number): Duration {
|
||||
return {
|
||||
seconds: (millis / 1000) | 0,
|
||||
@ -35,6 +47,10 @@ export function isDuration(value: any): value is Duration {
|
||||
return typeof value.seconds === 'number' && typeof value.nanos === 'number';
|
||||
}
|
||||
|
||||
export function isDurationMessage(value: any): value is DurationMessage {
|
||||
return typeof value.seconds === 'string' && typeof value.nanos === 'number';
|
||||
}
|
||||
|
||||
const durationRegex = /^(\d+)(?:\.(\d+))?s$/;
|
||||
export function parseDuration(value: string): Duration | null {
|
||||
const match = value.match(durationRegex);
|
||||
@ -46,3 +62,18 @@ export function parseDuration(value: string): Duration | null {
|
||||
nanos: match[2] ? Number.parseInt(match[2].padEnd(9, '0'), 10) : 0
|
||||
};
|
||||
}
|
||||
|
||||
export function durationToString(duration: Duration): string {
|
||||
if (duration.nanos === 0) {
|
||||
return `${duration.seconds}s`;
|
||||
}
|
||||
let scaleFactor: number;
|
||||
if (duration.nanos % 1_000_000 === 0) {
|
||||
scaleFactor = 1_000_000;
|
||||
} else if (duration.nanos % 1_000 === 0) {
|
||||
scaleFactor = 1_000;
|
||||
} else {
|
||||
scaleFactor = 1;
|
||||
}
|
||||
return `${duration.seconds}.${duration.nanos/scaleFactor}s`;
|
||||
}
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto';
|
||||
import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto';
|
||||
import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto';
|
||||
import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from '../../google/protobuf/MessageOptions';
|
||||
import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from '../../google/protobuf/OneofDescriptorProto';
|
||||
import type { SymbolVisibility as _google_protobuf_SymbolVisibility, SymbolVisibility__Output as _google_protobuf_SymbolVisibility__Output } from '../../google/protobuf/SymbolVisibility';
|
||||
import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from '../../google/protobuf/ExtensionRangeOptions';
|
||||
|
||||
export interface _google_protobuf_DescriptorProto_ExtensionRange {
|
||||
'start'?: (number);
|
||||
'end'?: (number);
|
||||
'options'?: (_google_protobuf_ExtensionRangeOptions | null);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_DescriptorProto_ExtensionRange__Output {
|
||||
'start': (number);
|
||||
'end': (number);
|
||||
'options': (_google_protobuf_ExtensionRangeOptions__Output | null);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_DescriptorProto_ReservedRange {
|
||||
'start'?: (number);
|
||||
'end'?: (number);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_DescriptorProto_ReservedRange__Output {
|
||||
'start': (number);
|
||||
'end': (number);
|
||||
}
|
||||
|
||||
export interface DescriptorProto {
|
||||
'name'?: (string);
|
||||
'field'?: (_google_protobuf_FieldDescriptorProto)[];
|
||||
'nestedType'?: (_google_protobuf_DescriptorProto)[];
|
||||
'enumType'?: (_google_protobuf_EnumDescriptorProto)[];
|
||||
'extensionRange'?: (_google_protobuf_DescriptorProto_ExtensionRange)[];
|
||||
'extension'?: (_google_protobuf_FieldDescriptorProto)[];
|
||||
'options'?: (_google_protobuf_MessageOptions | null);
|
||||
'oneofDecl'?: (_google_protobuf_OneofDescriptorProto)[];
|
||||
'reservedRange'?: (_google_protobuf_DescriptorProto_ReservedRange)[];
|
||||
'reservedName'?: (string)[];
|
||||
'visibility'?: (_google_protobuf_SymbolVisibility);
|
||||
}
|
||||
|
||||
export interface DescriptorProto__Output {
|
||||
'name': (string);
|
||||
'field': (_google_protobuf_FieldDescriptorProto__Output)[];
|
||||
'nestedType': (_google_protobuf_DescriptorProto__Output)[];
|
||||
'enumType': (_google_protobuf_EnumDescriptorProto__Output)[];
|
||||
'extensionRange': (_google_protobuf_DescriptorProto_ExtensionRange__Output)[];
|
||||
'extension': (_google_protobuf_FieldDescriptorProto__Output)[];
|
||||
'options': (_google_protobuf_MessageOptions__Output | null);
|
||||
'oneofDecl': (_google_protobuf_OneofDescriptorProto__Output)[];
|
||||
'reservedRange': (_google_protobuf_DescriptorProto_ReservedRange__Output)[];
|
||||
'reservedName': (string)[];
|
||||
'visibility': (_google_protobuf_SymbolVisibility__Output);
|
||||
}
|
||||
44
packages/grpc-js/src/generated/google/protobuf/Edition.ts
Normal file
44
packages/grpc-js/src/generated/google/protobuf/Edition.ts
Normal file
@ -0,0 +1,44 @@
|
||||
// Original file: null
|
||||
|
||||
export const Edition = {
|
||||
EDITION_UNKNOWN: 'EDITION_UNKNOWN',
|
||||
EDITION_LEGACY: 'EDITION_LEGACY',
|
||||
EDITION_PROTO2: 'EDITION_PROTO2',
|
||||
EDITION_PROTO3: 'EDITION_PROTO3',
|
||||
EDITION_2023: 'EDITION_2023',
|
||||
EDITION_2024: 'EDITION_2024',
|
||||
EDITION_1_TEST_ONLY: 'EDITION_1_TEST_ONLY',
|
||||
EDITION_2_TEST_ONLY: 'EDITION_2_TEST_ONLY',
|
||||
EDITION_99997_TEST_ONLY: 'EDITION_99997_TEST_ONLY',
|
||||
EDITION_99998_TEST_ONLY: 'EDITION_99998_TEST_ONLY',
|
||||
EDITION_99999_TEST_ONLY: 'EDITION_99999_TEST_ONLY',
|
||||
EDITION_MAX: 'EDITION_MAX',
|
||||
} as const;
|
||||
|
||||
export type Edition =
|
||||
| 'EDITION_UNKNOWN'
|
||||
| 0
|
||||
| 'EDITION_LEGACY'
|
||||
| 900
|
||||
| 'EDITION_PROTO2'
|
||||
| 998
|
||||
| 'EDITION_PROTO3'
|
||||
| 999
|
||||
| 'EDITION_2023'
|
||||
| 1000
|
||||
| 'EDITION_2024'
|
||||
| 1001
|
||||
| 'EDITION_1_TEST_ONLY'
|
||||
| 1
|
||||
| 'EDITION_2_TEST_ONLY'
|
||||
| 2
|
||||
| 'EDITION_99997_TEST_ONLY'
|
||||
| 99997
|
||||
| 'EDITION_99998_TEST_ONLY'
|
||||
| 99998
|
||||
| 'EDITION_99999_TEST_ONLY'
|
||||
| 99999
|
||||
| 'EDITION_MAX'
|
||||
| 2147483647
|
||||
|
||||
export type Edition__Output = typeof Edition[keyof typeof Edition]
|
||||
@ -0,0 +1,33 @@
|
||||
// Original file: null
|
||||
|
||||
import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from '../../google/protobuf/EnumValueDescriptorProto';
|
||||
import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from '../../google/protobuf/EnumOptions';
|
||||
import type { SymbolVisibility as _google_protobuf_SymbolVisibility, SymbolVisibility__Output as _google_protobuf_SymbolVisibility__Output } from '../../google/protobuf/SymbolVisibility';
|
||||
|
||||
export interface _google_protobuf_EnumDescriptorProto_EnumReservedRange {
|
||||
'start'?: (number);
|
||||
'end'?: (number);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_EnumDescriptorProto_EnumReservedRange__Output {
|
||||
'start': (number);
|
||||
'end': (number);
|
||||
}
|
||||
|
||||
export interface EnumDescriptorProto {
|
||||
'name'?: (string);
|
||||
'value'?: (_google_protobuf_EnumValueDescriptorProto)[];
|
||||
'options'?: (_google_protobuf_EnumOptions | null);
|
||||
'reservedRange'?: (_google_protobuf_EnumDescriptorProto_EnumReservedRange)[];
|
||||
'reservedName'?: (string)[];
|
||||
'visibility'?: (_google_protobuf_SymbolVisibility);
|
||||
}
|
||||
|
||||
export interface EnumDescriptorProto__Output {
|
||||
'name': (string);
|
||||
'value': (_google_protobuf_EnumValueDescriptorProto__Output)[];
|
||||
'options': (_google_protobuf_EnumOptions__Output | null);
|
||||
'reservedRange': (_google_protobuf_EnumDescriptorProto_EnumReservedRange__Output)[];
|
||||
'reservedName': (string)[];
|
||||
'visibility': (_google_protobuf_SymbolVisibility__Output);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
export interface EnumOptions {
|
||||
'allowAlias'?: (boolean);
|
||||
'deprecated'?: (boolean);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'deprecatedLegacyJsonFieldConflicts'?: (boolean);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
}
|
||||
|
||||
export interface EnumOptions__Output {
|
||||
'allowAlias': (boolean);
|
||||
'deprecated': (boolean);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'deprecatedLegacyJsonFieldConflicts': (boolean);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
// Original file: null
|
||||
|
||||
import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from '../../google/protobuf/EnumValueOptions';
|
||||
|
||||
export interface EnumValueDescriptorProto {
|
||||
'name'?: (string);
|
||||
'number'?: (number);
|
||||
'options'?: (_google_protobuf_EnumValueOptions | null);
|
||||
}
|
||||
|
||||
export interface EnumValueDescriptorProto__Output {
|
||||
'name': (string);
|
||||
'number': (number);
|
||||
'options': (_google_protobuf_EnumValueOptions__Output | null);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { _google_protobuf_FieldOptions_FeatureSupport, _google_protobuf_FieldOptions_FeatureSupport__Output } from '../../google/protobuf/FieldOptions';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
export interface EnumValueOptions {
|
||||
'deprecated'?: (boolean);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'debugRedact'?: (boolean);
|
||||
'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
}
|
||||
|
||||
export interface EnumValueOptions__Output {
|
||||
'deprecated': (boolean);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'debugRedact': (boolean);
|
||||
'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
export interface _google_protobuf_ExtensionRangeOptions_Declaration {
|
||||
'number'?: (number);
|
||||
'fullName'?: (string);
|
||||
'type'?: (string);
|
||||
'reserved'?: (boolean);
|
||||
'repeated'?: (boolean);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_ExtensionRangeOptions_Declaration__Output {
|
||||
'number': (number);
|
||||
'fullName': (string);
|
||||
'type': (string);
|
||||
'reserved': (boolean);
|
||||
'repeated': (boolean);
|
||||
}
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_ExtensionRangeOptions_VerificationState = {
|
||||
DECLARATION: 'DECLARATION',
|
||||
UNVERIFIED: 'UNVERIFIED',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_ExtensionRangeOptions_VerificationState =
|
||||
| 'DECLARATION'
|
||||
| 0
|
||||
| 'UNVERIFIED'
|
||||
| 1
|
||||
|
||||
export type _google_protobuf_ExtensionRangeOptions_VerificationState__Output = typeof _google_protobuf_ExtensionRangeOptions_VerificationState[keyof typeof _google_protobuf_ExtensionRangeOptions_VerificationState]
|
||||
|
||||
export interface ExtensionRangeOptions {
|
||||
'declaration'?: (_google_protobuf_ExtensionRangeOptions_Declaration)[];
|
||||
'verification'?: (_google_protobuf_ExtensionRangeOptions_VerificationState);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
}
|
||||
|
||||
export interface ExtensionRangeOptions__Output {
|
||||
'declaration': (_google_protobuf_ExtensionRangeOptions_Declaration__Output)[];
|
||||
'verification': (_google_protobuf_ExtensionRangeOptions_VerificationState__Output);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
}
|
||||
183
packages/grpc-js/src/generated/google/protobuf/FeatureSet.ts
Normal file
183
packages/grpc-js/src/generated/google/protobuf/FeatureSet.ts
Normal file
@ -0,0 +1,183 @@
|
||||
// Original file: null
|
||||
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility = {
|
||||
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN',
|
||||
EXPORT_ALL: 'EXPORT_ALL',
|
||||
EXPORT_TOP_LEVEL: 'EXPORT_TOP_LEVEL',
|
||||
LOCAL_ALL: 'LOCAL_ALL',
|
||||
STRICT: 'STRICT',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility =
|
||||
| 'DEFAULT_SYMBOL_VISIBILITY_UNKNOWN'
|
||||
| 0
|
||||
| 'EXPORT_ALL'
|
||||
| 1
|
||||
| 'EXPORT_TOP_LEVEL'
|
||||
| 2
|
||||
| 'LOCAL_ALL'
|
||||
| 3
|
||||
| 'STRICT'
|
||||
| 4
|
||||
|
||||
export type _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility__Output = typeof _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility[keyof typeof _google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_EnforceNamingStyle = {
|
||||
ENFORCE_NAMING_STYLE_UNKNOWN: 'ENFORCE_NAMING_STYLE_UNKNOWN',
|
||||
STYLE2024: 'STYLE2024',
|
||||
STYLE_LEGACY: 'STYLE_LEGACY',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_EnforceNamingStyle =
|
||||
| 'ENFORCE_NAMING_STYLE_UNKNOWN'
|
||||
| 0
|
||||
| 'STYLE2024'
|
||||
| 1
|
||||
| 'STYLE_LEGACY'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FeatureSet_EnforceNamingStyle__Output = typeof _google_protobuf_FeatureSet_EnforceNamingStyle[keyof typeof _google_protobuf_FeatureSet_EnforceNamingStyle]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_EnumType = {
|
||||
ENUM_TYPE_UNKNOWN: 'ENUM_TYPE_UNKNOWN',
|
||||
OPEN: 'OPEN',
|
||||
CLOSED: 'CLOSED',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_EnumType =
|
||||
| 'ENUM_TYPE_UNKNOWN'
|
||||
| 0
|
||||
| 'OPEN'
|
||||
| 1
|
||||
| 'CLOSED'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FeatureSet_EnumType__Output = typeof _google_protobuf_FeatureSet_EnumType[keyof typeof _google_protobuf_FeatureSet_EnumType]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_FieldPresence = {
|
||||
FIELD_PRESENCE_UNKNOWN: 'FIELD_PRESENCE_UNKNOWN',
|
||||
EXPLICIT: 'EXPLICIT',
|
||||
IMPLICIT: 'IMPLICIT',
|
||||
LEGACY_REQUIRED: 'LEGACY_REQUIRED',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_FieldPresence =
|
||||
| 'FIELD_PRESENCE_UNKNOWN'
|
||||
| 0
|
||||
| 'EXPLICIT'
|
||||
| 1
|
||||
| 'IMPLICIT'
|
||||
| 2
|
||||
| 'LEGACY_REQUIRED'
|
||||
| 3
|
||||
|
||||
export type _google_protobuf_FeatureSet_FieldPresence__Output = typeof _google_protobuf_FeatureSet_FieldPresence[keyof typeof _google_protobuf_FeatureSet_FieldPresence]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_JsonFormat = {
|
||||
JSON_FORMAT_UNKNOWN: 'JSON_FORMAT_UNKNOWN',
|
||||
ALLOW: 'ALLOW',
|
||||
LEGACY_BEST_EFFORT: 'LEGACY_BEST_EFFORT',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_JsonFormat =
|
||||
| 'JSON_FORMAT_UNKNOWN'
|
||||
| 0
|
||||
| 'ALLOW'
|
||||
| 1
|
||||
| 'LEGACY_BEST_EFFORT'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FeatureSet_JsonFormat__Output = typeof _google_protobuf_FeatureSet_JsonFormat[keyof typeof _google_protobuf_FeatureSet_JsonFormat]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_MessageEncoding = {
|
||||
MESSAGE_ENCODING_UNKNOWN: 'MESSAGE_ENCODING_UNKNOWN',
|
||||
LENGTH_PREFIXED: 'LENGTH_PREFIXED',
|
||||
DELIMITED: 'DELIMITED',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_MessageEncoding =
|
||||
| 'MESSAGE_ENCODING_UNKNOWN'
|
||||
| 0
|
||||
| 'LENGTH_PREFIXED'
|
||||
| 1
|
||||
| 'DELIMITED'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FeatureSet_MessageEncoding__Output = typeof _google_protobuf_FeatureSet_MessageEncoding[keyof typeof _google_protobuf_FeatureSet_MessageEncoding]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_RepeatedFieldEncoding = {
|
||||
REPEATED_FIELD_ENCODING_UNKNOWN: 'REPEATED_FIELD_ENCODING_UNKNOWN',
|
||||
PACKED: 'PACKED',
|
||||
EXPANDED: 'EXPANDED',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_RepeatedFieldEncoding =
|
||||
| 'REPEATED_FIELD_ENCODING_UNKNOWN'
|
||||
| 0
|
||||
| 'PACKED'
|
||||
| 1
|
||||
| 'EXPANDED'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FeatureSet_RepeatedFieldEncoding__Output = typeof _google_protobuf_FeatureSet_RepeatedFieldEncoding[keyof typeof _google_protobuf_FeatureSet_RepeatedFieldEncoding]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FeatureSet_Utf8Validation = {
|
||||
UTF8_VALIDATION_UNKNOWN: 'UTF8_VALIDATION_UNKNOWN',
|
||||
VERIFY: 'VERIFY',
|
||||
NONE: 'NONE',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FeatureSet_Utf8Validation =
|
||||
| 'UTF8_VALIDATION_UNKNOWN'
|
||||
| 0
|
||||
| 'VERIFY'
|
||||
| 2
|
||||
| 'NONE'
|
||||
| 3
|
||||
|
||||
export type _google_protobuf_FeatureSet_Utf8Validation__Output = typeof _google_protobuf_FeatureSet_Utf8Validation[keyof typeof _google_protobuf_FeatureSet_Utf8Validation]
|
||||
|
||||
export interface _google_protobuf_FeatureSet_VisibilityFeature {
|
||||
}
|
||||
|
||||
export interface _google_protobuf_FeatureSet_VisibilityFeature__Output {
|
||||
}
|
||||
|
||||
export interface FeatureSet {
|
||||
'fieldPresence'?: (_google_protobuf_FeatureSet_FieldPresence);
|
||||
'enumType'?: (_google_protobuf_FeatureSet_EnumType);
|
||||
'repeatedFieldEncoding'?: (_google_protobuf_FeatureSet_RepeatedFieldEncoding);
|
||||
'utf8Validation'?: (_google_protobuf_FeatureSet_Utf8Validation);
|
||||
'messageEncoding'?: (_google_protobuf_FeatureSet_MessageEncoding);
|
||||
'jsonFormat'?: (_google_protobuf_FeatureSet_JsonFormat);
|
||||
'enforceNamingStyle'?: (_google_protobuf_FeatureSet_EnforceNamingStyle);
|
||||
'defaultSymbolVisibility'?: (_google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility);
|
||||
}
|
||||
|
||||
export interface FeatureSet__Output {
|
||||
'fieldPresence': (_google_protobuf_FeatureSet_FieldPresence__Output);
|
||||
'enumType': (_google_protobuf_FeatureSet_EnumType__Output);
|
||||
'repeatedFieldEncoding': (_google_protobuf_FeatureSet_RepeatedFieldEncoding__Output);
|
||||
'utf8Validation': (_google_protobuf_FeatureSet_Utf8Validation__Output);
|
||||
'messageEncoding': (_google_protobuf_FeatureSet_MessageEncoding__Output);
|
||||
'jsonFormat': (_google_protobuf_FeatureSet_JsonFormat__Output);
|
||||
'enforceNamingStyle': (_google_protobuf_FeatureSet_EnforceNamingStyle__Output);
|
||||
'defaultSymbolVisibility': (_google_protobuf_FeatureSet_VisibilityFeature_DefaultSymbolVisibility__Output);
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
// Original file: null
|
||||
|
||||
import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition';
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
|
||||
export interface _google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault {
|
||||
'edition'?: (_google_protobuf_Edition);
|
||||
'overridableFeatures'?: (_google_protobuf_FeatureSet | null);
|
||||
'fixedFeatures'?: (_google_protobuf_FeatureSet | null);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__Output {
|
||||
'edition': (_google_protobuf_Edition__Output);
|
||||
'overridableFeatures': (_google_protobuf_FeatureSet__Output | null);
|
||||
'fixedFeatures': (_google_protobuf_FeatureSet__Output | null);
|
||||
}
|
||||
|
||||
export interface FeatureSetDefaults {
|
||||
'defaults'?: (_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault)[];
|
||||
'minimumEdition'?: (_google_protobuf_Edition);
|
||||
'maximumEdition'?: (_google_protobuf_Edition);
|
||||
}
|
||||
|
||||
export interface FeatureSetDefaults__Output {
|
||||
'defaults': (_google_protobuf_FeatureSetDefaults_FeatureSetEditionDefault__Output)[];
|
||||
'minimumEdition': (_google_protobuf_Edition__Output);
|
||||
'maximumEdition': (_google_protobuf_Edition__Output);
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from '../../google/protobuf/FieldOptions';
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FieldDescriptorProto_Label = {
|
||||
LABEL_OPTIONAL: 'LABEL_OPTIONAL',
|
||||
LABEL_REPEATED: 'LABEL_REPEATED',
|
||||
LABEL_REQUIRED: 'LABEL_REQUIRED',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FieldDescriptorProto_Label =
|
||||
| 'LABEL_OPTIONAL'
|
||||
| 1
|
||||
| 'LABEL_REPEATED'
|
||||
| 3
|
||||
| 'LABEL_REQUIRED'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FieldDescriptorProto_Label__Output = typeof _google_protobuf_FieldDescriptorProto_Label[keyof typeof _google_protobuf_FieldDescriptorProto_Label]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FieldDescriptorProto_Type = {
|
||||
TYPE_DOUBLE: 'TYPE_DOUBLE',
|
||||
TYPE_FLOAT: 'TYPE_FLOAT',
|
||||
TYPE_INT64: 'TYPE_INT64',
|
||||
TYPE_UINT64: 'TYPE_UINT64',
|
||||
TYPE_INT32: 'TYPE_INT32',
|
||||
TYPE_FIXED64: 'TYPE_FIXED64',
|
||||
TYPE_FIXED32: 'TYPE_FIXED32',
|
||||
TYPE_BOOL: 'TYPE_BOOL',
|
||||
TYPE_STRING: 'TYPE_STRING',
|
||||
TYPE_GROUP: 'TYPE_GROUP',
|
||||
TYPE_MESSAGE: 'TYPE_MESSAGE',
|
||||
TYPE_BYTES: 'TYPE_BYTES',
|
||||
TYPE_UINT32: 'TYPE_UINT32',
|
||||
TYPE_ENUM: 'TYPE_ENUM',
|
||||
TYPE_SFIXED32: 'TYPE_SFIXED32',
|
||||
TYPE_SFIXED64: 'TYPE_SFIXED64',
|
||||
TYPE_SINT32: 'TYPE_SINT32',
|
||||
TYPE_SINT64: 'TYPE_SINT64',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FieldDescriptorProto_Type =
|
||||
| 'TYPE_DOUBLE'
|
||||
| 1
|
||||
| 'TYPE_FLOAT'
|
||||
| 2
|
||||
| 'TYPE_INT64'
|
||||
| 3
|
||||
| 'TYPE_UINT64'
|
||||
| 4
|
||||
| 'TYPE_INT32'
|
||||
| 5
|
||||
| 'TYPE_FIXED64'
|
||||
| 6
|
||||
| 'TYPE_FIXED32'
|
||||
| 7
|
||||
| 'TYPE_BOOL'
|
||||
| 8
|
||||
| 'TYPE_STRING'
|
||||
| 9
|
||||
| 'TYPE_GROUP'
|
||||
| 10
|
||||
| 'TYPE_MESSAGE'
|
||||
| 11
|
||||
| 'TYPE_BYTES'
|
||||
| 12
|
||||
| 'TYPE_UINT32'
|
||||
| 13
|
||||
| 'TYPE_ENUM'
|
||||
| 14
|
||||
| 'TYPE_SFIXED32'
|
||||
| 15
|
||||
| 'TYPE_SFIXED64'
|
||||
| 16
|
||||
| 'TYPE_SINT32'
|
||||
| 17
|
||||
| 'TYPE_SINT64'
|
||||
| 18
|
||||
|
||||
export type _google_protobuf_FieldDescriptorProto_Type__Output = typeof _google_protobuf_FieldDescriptorProto_Type[keyof typeof _google_protobuf_FieldDescriptorProto_Type]
|
||||
|
||||
export interface FieldDescriptorProto {
|
||||
'name'?: (string);
|
||||
'extendee'?: (string);
|
||||
'number'?: (number);
|
||||
'label'?: (_google_protobuf_FieldDescriptorProto_Label);
|
||||
'type'?: (_google_protobuf_FieldDescriptorProto_Type);
|
||||
'typeName'?: (string);
|
||||
'defaultValue'?: (string);
|
||||
'options'?: (_google_protobuf_FieldOptions | null);
|
||||
'oneofIndex'?: (number);
|
||||
'jsonName'?: (string);
|
||||
'proto3Optional'?: (boolean);
|
||||
}
|
||||
|
||||
export interface FieldDescriptorProto__Output {
|
||||
'name': (string);
|
||||
'extendee': (string);
|
||||
'number': (number);
|
||||
'label': (_google_protobuf_FieldDescriptorProto_Label__Output);
|
||||
'type': (_google_protobuf_FieldDescriptorProto_Type__Output);
|
||||
'typeName': (string);
|
||||
'defaultValue': (string);
|
||||
'options': (_google_protobuf_FieldOptions__Output | null);
|
||||
'oneofIndex': (number);
|
||||
'jsonName': (string);
|
||||
'proto3Optional': (boolean);
|
||||
}
|
||||
165
packages/grpc-js/src/generated/google/protobuf/FieldOptions.ts
Normal file
165
packages/grpc-js/src/generated/google/protobuf/FieldOptions.ts
Normal file
@ -0,0 +1,165 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from '../../validate/FieldRules';
|
||||
import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition';
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FieldOptions_CType = {
|
||||
STRING: 'STRING',
|
||||
CORD: 'CORD',
|
||||
STRING_PIECE: 'STRING_PIECE',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FieldOptions_CType =
|
||||
| 'STRING'
|
||||
| 0
|
||||
| 'CORD'
|
||||
| 1
|
||||
| 'STRING_PIECE'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FieldOptions_CType__Output = typeof _google_protobuf_FieldOptions_CType[keyof typeof _google_protobuf_FieldOptions_CType]
|
||||
|
||||
export interface _google_protobuf_FieldOptions_EditionDefault {
|
||||
'edition'?: (_google_protobuf_Edition);
|
||||
'value'?: (string);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_FieldOptions_EditionDefault__Output {
|
||||
'edition': (_google_protobuf_Edition__Output);
|
||||
'value': (string);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_FieldOptions_FeatureSupport {
|
||||
'editionIntroduced'?: (_google_protobuf_Edition);
|
||||
'editionDeprecated'?: (_google_protobuf_Edition);
|
||||
'deprecationWarning'?: (string);
|
||||
'editionRemoved'?: (_google_protobuf_Edition);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_FieldOptions_FeatureSupport__Output {
|
||||
'editionIntroduced': (_google_protobuf_Edition__Output);
|
||||
'editionDeprecated': (_google_protobuf_Edition__Output);
|
||||
'deprecationWarning': (string);
|
||||
'editionRemoved': (_google_protobuf_Edition__Output);
|
||||
}
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FieldOptions_JSType = {
|
||||
JS_NORMAL: 'JS_NORMAL',
|
||||
JS_STRING: 'JS_STRING',
|
||||
JS_NUMBER: 'JS_NUMBER',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FieldOptions_JSType =
|
||||
| 'JS_NORMAL'
|
||||
| 0
|
||||
| 'JS_STRING'
|
||||
| 1
|
||||
| 'JS_NUMBER'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FieldOptions_JSType__Output = typeof _google_protobuf_FieldOptions_JSType[keyof typeof _google_protobuf_FieldOptions_JSType]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FieldOptions_OptionRetention = {
|
||||
RETENTION_UNKNOWN: 'RETENTION_UNKNOWN',
|
||||
RETENTION_RUNTIME: 'RETENTION_RUNTIME',
|
||||
RETENTION_SOURCE: 'RETENTION_SOURCE',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FieldOptions_OptionRetention =
|
||||
| 'RETENTION_UNKNOWN'
|
||||
| 0
|
||||
| 'RETENTION_RUNTIME'
|
||||
| 1
|
||||
| 'RETENTION_SOURCE'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_FieldOptions_OptionRetention__Output = typeof _google_protobuf_FieldOptions_OptionRetention[keyof typeof _google_protobuf_FieldOptions_OptionRetention]
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FieldOptions_OptionTargetType = {
|
||||
TARGET_TYPE_UNKNOWN: 'TARGET_TYPE_UNKNOWN',
|
||||
TARGET_TYPE_FILE: 'TARGET_TYPE_FILE',
|
||||
TARGET_TYPE_EXTENSION_RANGE: 'TARGET_TYPE_EXTENSION_RANGE',
|
||||
TARGET_TYPE_MESSAGE: 'TARGET_TYPE_MESSAGE',
|
||||
TARGET_TYPE_FIELD: 'TARGET_TYPE_FIELD',
|
||||
TARGET_TYPE_ONEOF: 'TARGET_TYPE_ONEOF',
|
||||
TARGET_TYPE_ENUM: 'TARGET_TYPE_ENUM',
|
||||
TARGET_TYPE_ENUM_ENTRY: 'TARGET_TYPE_ENUM_ENTRY',
|
||||
TARGET_TYPE_SERVICE: 'TARGET_TYPE_SERVICE',
|
||||
TARGET_TYPE_METHOD: 'TARGET_TYPE_METHOD',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FieldOptions_OptionTargetType =
|
||||
| 'TARGET_TYPE_UNKNOWN'
|
||||
| 0
|
||||
| 'TARGET_TYPE_FILE'
|
||||
| 1
|
||||
| 'TARGET_TYPE_EXTENSION_RANGE'
|
||||
| 2
|
||||
| 'TARGET_TYPE_MESSAGE'
|
||||
| 3
|
||||
| 'TARGET_TYPE_FIELD'
|
||||
| 4
|
||||
| 'TARGET_TYPE_ONEOF'
|
||||
| 5
|
||||
| 'TARGET_TYPE_ENUM'
|
||||
| 6
|
||||
| 'TARGET_TYPE_ENUM_ENTRY'
|
||||
| 7
|
||||
| 'TARGET_TYPE_SERVICE'
|
||||
| 8
|
||||
| 'TARGET_TYPE_METHOD'
|
||||
| 9
|
||||
|
||||
export type _google_protobuf_FieldOptions_OptionTargetType__Output = typeof _google_protobuf_FieldOptions_OptionTargetType[keyof typeof _google_protobuf_FieldOptions_OptionTargetType]
|
||||
|
||||
export interface FieldOptions {
|
||||
'ctype'?: (_google_protobuf_FieldOptions_CType);
|
||||
'packed'?: (boolean);
|
||||
'deprecated'?: (boolean);
|
||||
'lazy'?: (boolean);
|
||||
'jstype'?: (_google_protobuf_FieldOptions_JSType);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'weak'?: (boolean);
|
||||
'unverifiedLazy'?: (boolean);
|
||||
'debugRedact'?: (boolean);
|
||||
'retention'?: (_google_protobuf_FieldOptions_OptionRetention);
|
||||
'targets'?: (_google_protobuf_FieldOptions_OptionTargetType)[];
|
||||
'editionDefaults'?: (_google_protobuf_FieldOptions_EditionDefault)[];
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'featureSupport'?: (_google_protobuf_FieldOptions_FeatureSupport | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.rules'?: (_validate_FieldRules | null);
|
||||
}
|
||||
|
||||
export interface FieldOptions__Output {
|
||||
'ctype': (_google_protobuf_FieldOptions_CType__Output);
|
||||
'packed': (boolean);
|
||||
'deprecated': (boolean);
|
||||
'lazy': (boolean);
|
||||
'jstype': (_google_protobuf_FieldOptions_JSType__Output);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'weak': (boolean);
|
||||
'unverifiedLazy': (boolean);
|
||||
'debugRedact': (boolean);
|
||||
'retention': (_google_protobuf_FieldOptions_OptionRetention__Output);
|
||||
'targets': (_google_protobuf_FieldOptions_OptionTargetType__Output)[];
|
||||
'editionDefaults': (_google_protobuf_FieldOptions_EditionDefault__Output)[];
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'featureSupport': (_google_protobuf_FieldOptions_FeatureSupport__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.rules': (_validate_FieldRules__Output | null);
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
// Original file: null
|
||||
|
||||
import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from '../../google/protobuf/DescriptorProto';
|
||||
import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from '../../google/protobuf/EnumDescriptorProto';
|
||||
import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from '../../google/protobuf/ServiceDescriptorProto';
|
||||
import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from '../../google/protobuf/FieldDescriptorProto';
|
||||
import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from '../../google/protobuf/FileOptions';
|
||||
import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from '../../google/protobuf/SourceCodeInfo';
|
||||
import type { Edition as _google_protobuf_Edition, Edition__Output as _google_protobuf_Edition__Output } from '../../google/protobuf/Edition';
|
||||
|
||||
export interface FileDescriptorProto {
|
||||
'name'?: (string);
|
||||
'package'?: (string);
|
||||
'dependency'?: (string)[];
|
||||
'messageType'?: (_google_protobuf_DescriptorProto)[];
|
||||
'enumType'?: (_google_protobuf_EnumDescriptorProto)[];
|
||||
'service'?: (_google_protobuf_ServiceDescriptorProto)[];
|
||||
'extension'?: (_google_protobuf_FieldDescriptorProto)[];
|
||||
'options'?: (_google_protobuf_FileOptions | null);
|
||||
'sourceCodeInfo'?: (_google_protobuf_SourceCodeInfo | null);
|
||||
'publicDependency'?: (number)[];
|
||||
'weakDependency'?: (number)[];
|
||||
'syntax'?: (string);
|
||||
'edition'?: (_google_protobuf_Edition);
|
||||
'optionDependency'?: (string)[];
|
||||
}
|
||||
|
||||
export interface FileDescriptorProto__Output {
|
||||
'name': (string);
|
||||
'package': (string);
|
||||
'dependency': (string)[];
|
||||
'messageType': (_google_protobuf_DescriptorProto__Output)[];
|
||||
'enumType': (_google_protobuf_EnumDescriptorProto__Output)[];
|
||||
'service': (_google_protobuf_ServiceDescriptorProto__Output)[];
|
||||
'extension': (_google_protobuf_FieldDescriptorProto__Output)[];
|
||||
'options': (_google_protobuf_FileOptions__Output | null);
|
||||
'sourceCodeInfo': (_google_protobuf_SourceCodeInfo__Output | null);
|
||||
'publicDependency': (number)[];
|
||||
'weakDependency': (number)[];
|
||||
'syntax': (string);
|
||||
'edition': (_google_protobuf_Edition__Output);
|
||||
'optionDependency': (string)[];
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from '../../google/protobuf/FileDescriptorProto';
|
||||
|
||||
export interface FileDescriptorSet {
|
||||
'file'?: (_google_protobuf_FileDescriptorProto)[];
|
||||
}
|
||||
|
||||
export interface FileDescriptorSet__Output {
|
||||
'file': (_google_protobuf_FileDescriptorProto__Output)[];
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_FileOptions_OptimizeMode = {
|
||||
SPEED: 'SPEED',
|
||||
CODE_SIZE: 'CODE_SIZE',
|
||||
LITE_RUNTIME: 'LITE_RUNTIME',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_FileOptions_OptimizeMode =
|
||||
| 'SPEED'
|
||||
| 1
|
||||
| 'CODE_SIZE'
|
||||
| 2
|
||||
| 'LITE_RUNTIME'
|
||||
| 3
|
||||
|
||||
export type _google_protobuf_FileOptions_OptimizeMode__Output = typeof _google_protobuf_FileOptions_OptimizeMode[keyof typeof _google_protobuf_FileOptions_OptimizeMode]
|
||||
|
||||
export interface FileOptions {
|
||||
'javaPackage'?: (string);
|
||||
'javaOuterClassname'?: (string);
|
||||
'optimizeFor'?: (_google_protobuf_FileOptions_OptimizeMode);
|
||||
'javaMultipleFiles'?: (boolean);
|
||||
'goPackage'?: (string);
|
||||
'ccGenericServices'?: (boolean);
|
||||
'javaGenericServices'?: (boolean);
|
||||
'pyGenericServices'?: (boolean);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'javaGenerateEqualsAndHash'?: (boolean);
|
||||
'deprecated'?: (boolean);
|
||||
'javaStringCheckUtf8'?: (boolean);
|
||||
'ccEnableArenas'?: (boolean);
|
||||
'objcClassPrefix'?: (string);
|
||||
'csharpNamespace'?: (string);
|
||||
'swiftPrefix'?: (string);
|
||||
'phpClassPrefix'?: (string);
|
||||
'phpNamespace'?: (string);
|
||||
'phpMetadataNamespace'?: (string);
|
||||
'rubyPackage'?: (string);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
}
|
||||
|
||||
export interface FileOptions__Output {
|
||||
'javaPackage': (string);
|
||||
'javaOuterClassname': (string);
|
||||
'optimizeFor': (_google_protobuf_FileOptions_OptimizeMode__Output);
|
||||
'javaMultipleFiles': (boolean);
|
||||
'goPackage': (string);
|
||||
'ccGenericServices': (boolean);
|
||||
'javaGenericServices': (boolean);
|
||||
'pyGenericServices': (boolean);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'javaGenerateEqualsAndHash': (boolean);
|
||||
'deprecated': (boolean);
|
||||
'javaStringCheckUtf8': (boolean);
|
||||
'ccEnableArenas': (boolean);
|
||||
'objcClassPrefix': (string);
|
||||
'csharpNamespace': (string);
|
||||
'swiftPrefix': (string);
|
||||
'phpClassPrefix': (string);
|
||||
'phpNamespace': (string);
|
||||
'phpMetadataNamespace': (string);
|
||||
'rubyPackage': (string);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
// Original file: null
|
||||
|
||||
|
||||
export interface _google_protobuf_GeneratedCodeInfo_Annotation {
|
||||
'path'?: (number)[];
|
||||
'sourceFile'?: (string);
|
||||
'begin'?: (number);
|
||||
'end'?: (number);
|
||||
'semantic'?: (_google_protobuf_GeneratedCodeInfo_Annotation_Semantic);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_GeneratedCodeInfo_Annotation__Output {
|
||||
'path': (number)[];
|
||||
'sourceFile': (string);
|
||||
'begin': (number);
|
||||
'end': (number);
|
||||
'semantic': (_google_protobuf_GeneratedCodeInfo_Annotation_Semantic__Output);
|
||||
}
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_GeneratedCodeInfo_Annotation_Semantic = {
|
||||
NONE: 'NONE',
|
||||
SET: 'SET',
|
||||
ALIAS: 'ALIAS',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_GeneratedCodeInfo_Annotation_Semantic =
|
||||
| 'NONE'
|
||||
| 0
|
||||
| 'SET'
|
||||
| 1
|
||||
| 'ALIAS'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_GeneratedCodeInfo_Annotation_Semantic__Output = typeof _google_protobuf_GeneratedCodeInfo_Annotation_Semantic[keyof typeof _google_protobuf_GeneratedCodeInfo_Annotation_Semantic]
|
||||
|
||||
export interface GeneratedCodeInfo {
|
||||
'annotation'?: (_google_protobuf_GeneratedCodeInfo_Annotation)[];
|
||||
}
|
||||
|
||||
export interface GeneratedCodeInfo__Output {
|
||||
'annotation': (_google_protobuf_GeneratedCodeInfo_Annotation__Output)[];
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
export interface MessageOptions {
|
||||
'messageSetWireFormat'?: (boolean);
|
||||
'noStandardDescriptorAccessor'?: (boolean);
|
||||
'deprecated'?: (boolean);
|
||||
'mapEntry'?: (boolean);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'deprecatedLegacyJsonFieldConflicts'?: (boolean);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.disabled'?: (boolean);
|
||||
}
|
||||
|
||||
export interface MessageOptions__Output {
|
||||
'messageSetWireFormat': (boolean);
|
||||
'noStandardDescriptorAccessor': (boolean);
|
||||
'deprecated': (boolean);
|
||||
'mapEntry': (boolean);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
'deprecatedLegacyJsonFieldConflicts': (boolean);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.disabled': (boolean);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
// Original file: null
|
||||
|
||||
import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from '../../google/protobuf/MethodOptions';
|
||||
|
||||
export interface MethodDescriptorProto {
|
||||
'name'?: (string);
|
||||
'inputType'?: (string);
|
||||
'outputType'?: (string);
|
||||
'options'?: (_google_protobuf_MethodOptions | null);
|
||||
'clientStreaming'?: (boolean);
|
||||
'serverStreaming'?: (boolean);
|
||||
}
|
||||
|
||||
export interface MethodDescriptorProto__Output {
|
||||
'name': (string);
|
||||
'inputType': (string);
|
||||
'outputType': (string);
|
||||
'options': (_google_protobuf_MethodOptions__Output | null);
|
||||
'clientStreaming': (boolean);
|
||||
'serverStreaming': (boolean);
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
// Original file: null
|
||||
|
||||
export const _google_protobuf_MethodOptions_IdempotencyLevel = {
|
||||
IDEMPOTENCY_UNKNOWN: 'IDEMPOTENCY_UNKNOWN',
|
||||
NO_SIDE_EFFECTS: 'NO_SIDE_EFFECTS',
|
||||
IDEMPOTENT: 'IDEMPOTENT',
|
||||
} as const;
|
||||
|
||||
export type _google_protobuf_MethodOptions_IdempotencyLevel =
|
||||
| 'IDEMPOTENCY_UNKNOWN'
|
||||
| 0
|
||||
| 'NO_SIDE_EFFECTS'
|
||||
| 1
|
||||
| 'IDEMPOTENT'
|
||||
| 2
|
||||
|
||||
export type _google_protobuf_MethodOptions_IdempotencyLevel__Output = typeof _google_protobuf_MethodOptions_IdempotencyLevel[keyof typeof _google_protobuf_MethodOptions_IdempotencyLevel]
|
||||
|
||||
export interface MethodOptions {
|
||||
'deprecated'?: (boolean);
|
||||
'idempotencyLevel'?: (_google_protobuf_MethodOptions_IdempotencyLevel);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
}
|
||||
|
||||
export interface MethodOptions__Output {
|
||||
'deprecated': (boolean);
|
||||
'idempotencyLevel': (_google_protobuf_MethodOptions_IdempotencyLevel__Output);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
// Original file: null
|
||||
|
||||
import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from '../../google/protobuf/OneofOptions';
|
||||
|
||||
export interface OneofDescriptorProto {
|
||||
'name'?: (string);
|
||||
'options'?: (_google_protobuf_OneofOptions | null);
|
||||
}
|
||||
|
||||
export interface OneofDescriptorProto__Output {
|
||||
'name': (string);
|
||||
'options': (_google_protobuf_OneofOptions__Output | null);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
export interface OneofOptions {
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
'.validate.required'?: (boolean);
|
||||
}
|
||||
|
||||
export interface OneofOptions__Output {
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
'.validate.required': (boolean);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
// Original file: null
|
||||
|
||||
import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from '../../google/protobuf/MethodDescriptorProto';
|
||||
import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from '../../google/protobuf/ServiceOptions';
|
||||
|
||||
export interface ServiceDescriptorProto {
|
||||
'name'?: (string);
|
||||
'method'?: (_google_protobuf_MethodDescriptorProto)[];
|
||||
'options'?: (_google_protobuf_ServiceOptions | null);
|
||||
}
|
||||
|
||||
export interface ServiceDescriptorProto__Output {
|
||||
'name': (string);
|
||||
'method': (_google_protobuf_MethodDescriptorProto__Output)[];
|
||||
'options': (_google_protobuf_ServiceOptions__Output | null);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
// Original file: null
|
||||
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption';
|
||||
|
||||
export interface ServiceOptions {
|
||||
'deprecated'?: (boolean);
|
||||
'features'?: (_google_protobuf_FeatureSet | null);
|
||||
'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[];
|
||||
}
|
||||
|
||||
export interface ServiceOptions__Output {
|
||||
'deprecated': (boolean);
|
||||
'features': (_google_protobuf_FeatureSet__Output | null);
|
||||
'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[];
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
// Original file: null
|
||||
|
||||
|
||||
export interface _google_protobuf_SourceCodeInfo_Location {
|
||||
'path'?: (number)[];
|
||||
'span'?: (number)[];
|
||||
'leadingComments'?: (string);
|
||||
'trailingComments'?: (string);
|
||||
'leadingDetachedComments'?: (string)[];
|
||||
}
|
||||
|
||||
export interface _google_protobuf_SourceCodeInfo_Location__Output {
|
||||
'path': (number)[];
|
||||
'span': (number)[];
|
||||
'leadingComments': (string);
|
||||
'trailingComments': (string);
|
||||
'leadingDetachedComments': (string)[];
|
||||
}
|
||||
|
||||
export interface SourceCodeInfo {
|
||||
'location'?: (_google_protobuf_SourceCodeInfo_Location)[];
|
||||
}
|
||||
|
||||
export interface SourceCodeInfo__Output {
|
||||
'location': (_google_protobuf_SourceCodeInfo_Location__Output)[];
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
// Original file: null
|
||||
|
||||
export const SymbolVisibility = {
|
||||
VISIBILITY_UNSET: 'VISIBILITY_UNSET',
|
||||
VISIBILITY_LOCAL: 'VISIBILITY_LOCAL',
|
||||
VISIBILITY_EXPORT: 'VISIBILITY_EXPORT',
|
||||
} as const;
|
||||
|
||||
export type SymbolVisibility =
|
||||
| 'VISIBILITY_UNSET'
|
||||
| 0
|
||||
| 'VISIBILITY_LOCAL'
|
||||
| 1
|
||||
| 'VISIBILITY_EXPORT'
|
||||
| 2
|
||||
|
||||
export type SymbolVisibility__Output = typeof SymbolVisibility[keyof typeof SymbolVisibility]
|
||||
@ -0,0 +1,33 @@
|
||||
// Original file: null
|
||||
|
||||
import type { Long } from '@grpc/proto-loader';
|
||||
|
||||
export interface _google_protobuf_UninterpretedOption_NamePart {
|
||||
'namePart'?: (string);
|
||||
'isExtension'?: (boolean);
|
||||
}
|
||||
|
||||
export interface _google_protobuf_UninterpretedOption_NamePart__Output {
|
||||
'namePart': (string);
|
||||
'isExtension': (boolean);
|
||||
}
|
||||
|
||||
export interface UninterpretedOption {
|
||||
'name'?: (_google_protobuf_UninterpretedOption_NamePart)[];
|
||||
'identifierValue'?: (string);
|
||||
'positiveIntValue'?: (number | string | Long);
|
||||
'negativeIntValue'?: (number | string | Long);
|
||||
'doubleValue'?: (number | string);
|
||||
'stringValue'?: (Buffer | Uint8Array | string);
|
||||
'aggregateValue'?: (string);
|
||||
}
|
||||
|
||||
export interface UninterpretedOption__Output {
|
||||
'name': (_google_protobuf_UninterpretedOption_NamePart__Output)[];
|
||||
'identifierValue': (string);
|
||||
'positiveIntValue': (string);
|
||||
'negativeIntValue': (string);
|
||||
'doubleValue': (number);
|
||||
'stringValue': (Buffer);
|
||||
'aggregateValue': (string);
|
||||
}
|
||||
146
packages/grpc-js/src/generated/orca.ts
Normal file
146
packages/grpc-js/src/generated/orca.ts
Normal file
@ -0,0 +1,146 @@
|
||||
import type * as grpc from '../index';
|
||||
import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader';
|
||||
|
||||
import type { DescriptorProto as _google_protobuf_DescriptorProto, DescriptorProto__Output as _google_protobuf_DescriptorProto__Output } from './google/protobuf/DescriptorProto';
|
||||
import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from './google/protobuf/Duration';
|
||||
import type { EnumDescriptorProto as _google_protobuf_EnumDescriptorProto, EnumDescriptorProto__Output as _google_protobuf_EnumDescriptorProto__Output } from './google/protobuf/EnumDescriptorProto';
|
||||
import type { EnumOptions as _google_protobuf_EnumOptions, EnumOptions__Output as _google_protobuf_EnumOptions__Output } from './google/protobuf/EnumOptions';
|
||||
import type { EnumValueDescriptorProto as _google_protobuf_EnumValueDescriptorProto, EnumValueDescriptorProto__Output as _google_protobuf_EnumValueDescriptorProto__Output } from './google/protobuf/EnumValueDescriptorProto';
|
||||
import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from './google/protobuf/EnumValueOptions';
|
||||
import type { ExtensionRangeOptions as _google_protobuf_ExtensionRangeOptions, ExtensionRangeOptions__Output as _google_protobuf_ExtensionRangeOptions__Output } from './google/protobuf/ExtensionRangeOptions';
|
||||
import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from './google/protobuf/FeatureSet';
|
||||
import type { FeatureSetDefaults as _google_protobuf_FeatureSetDefaults, FeatureSetDefaults__Output as _google_protobuf_FeatureSetDefaults__Output } from './google/protobuf/FeatureSetDefaults';
|
||||
import type { FieldDescriptorProto as _google_protobuf_FieldDescriptorProto, FieldDescriptorProto__Output as _google_protobuf_FieldDescriptorProto__Output } from './google/protobuf/FieldDescriptorProto';
|
||||
import type { FieldOptions as _google_protobuf_FieldOptions, FieldOptions__Output as _google_protobuf_FieldOptions__Output } from './google/protobuf/FieldOptions';
|
||||
import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from './google/protobuf/FileDescriptorProto';
|
||||
import type { FileDescriptorSet as _google_protobuf_FileDescriptorSet, FileDescriptorSet__Output as _google_protobuf_FileDescriptorSet__Output } from './google/protobuf/FileDescriptorSet';
|
||||
import type { FileOptions as _google_protobuf_FileOptions, FileOptions__Output as _google_protobuf_FileOptions__Output } from './google/protobuf/FileOptions';
|
||||
import type { GeneratedCodeInfo as _google_protobuf_GeneratedCodeInfo, GeneratedCodeInfo__Output as _google_protobuf_GeneratedCodeInfo__Output } from './google/protobuf/GeneratedCodeInfo';
|
||||
import type { MessageOptions as _google_protobuf_MessageOptions, MessageOptions__Output as _google_protobuf_MessageOptions__Output } from './google/protobuf/MessageOptions';
|
||||
import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from './google/protobuf/MethodDescriptorProto';
|
||||
import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from './google/protobuf/MethodOptions';
|
||||
import type { OneofDescriptorProto as _google_protobuf_OneofDescriptorProto, OneofDescriptorProto__Output as _google_protobuf_OneofDescriptorProto__Output } from './google/protobuf/OneofDescriptorProto';
|
||||
import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from './google/protobuf/OneofOptions';
|
||||
import type { ServiceDescriptorProto as _google_protobuf_ServiceDescriptorProto, ServiceDescriptorProto__Output as _google_protobuf_ServiceDescriptorProto__Output } from './google/protobuf/ServiceDescriptorProto';
|
||||
import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from './google/protobuf/ServiceOptions';
|
||||
import type { SourceCodeInfo as _google_protobuf_SourceCodeInfo, SourceCodeInfo__Output as _google_protobuf_SourceCodeInfo__Output } from './google/protobuf/SourceCodeInfo';
|
||||
import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from './google/protobuf/Timestamp';
|
||||
import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from './google/protobuf/UninterpretedOption';
|
||||
import type { AnyRules as _validate_AnyRules, AnyRules__Output as _validate_AnyRules__Output } from './validate/AnyRules';
|
||||
import type { BoolRules as _validate_BoolRules, BoolRules__Output as _validate_BoolRules__Output } from './validate/BoolRules';
|
||||
import type { BytesRules as _validate_BytesRules, BytesRules__Output as _validate_BytesRules__Output } from './validate/BytesRules';
|
||||
import type { DoubleRules as _validate_DoubleRules, DoubleRules__Output as _validate_DoubleRules__Output } from './validate/DoubleRules';
|
||||
import type { DurationRules as _validate_DurationRules, DurationRules__Output as _validate_DurationRules__Output } from './validate/DurationRules';
|
||||
import type { EnumRules as _validate_EnumRules, EnumRules__Output as _validate_EnumRules__Output } from './validate/EnumRules';
|
||||
import type { FieldRules as _validate_FieldRules, FieldRules__Output as _validate_FieldRules__Output } from './validate/FieldRules';
|
||||
import type { Fixed32Rules as _validate_Fixed32Rules, Fixed32Rules__Output as _validate_Fixed32Rules__Output } from './validate/Fixed32Rules';
|
||||
import type { Fixed64Rules as _validate_Fixed64Rules, Fixed64Rules__Output as _validate_Fixed64Rules__Output } from './validate/Fixed64Rules';
|
||||
import type { FloatRules as _validate_FloatRules, FloatRules__Output as _validate_FloatRules__Output } from './validate/FloatRules';
|
||||
import type { Int32Rules as _validate_Int32Rules, Int32Rules__Output as _validate_Int32Rules__Output } from './validate/Int32Rules';
|
||||
import type { Int64Rules as _validate_Int64Rules, Int64Rules__Output as _validate_Int64Rules__Output } from './validate/Int64Rules';
|
||||
import type { MapRules as _validate_MapRules, MapRules__Output as _validate_MapRules__Output } from './validate/MapRules';
|
||||
import type { MessageRules as _validate_MessageRules, MessageRules__Output as _validate_MessageRules__Output } from './validate/MessageRules';
|
||||
import type { RepeatedRules as _validate_RepeatedRules, RepeatedRules__Output as _validate_RepeatedRules__Output } from './validate/RepeatedRules';
|
||||
import type { SFixed32Rules as _validate_SFixed32Rules, SFixed32Rules__Output as _validate_SFixed32Rules__Output } from './validate/SFixed32Rules';
|
||||
import type { SFixed64Rules as _validate_SFixed64Rules, SFixed64Rules__Output as _validate_SFixed64Rules__Output } from './validate/SFixed64Rules';
|
||||
import type { SInt32Rules as _validate_SInt32Rules, SInt32Rules__Output as _validate_SInt32Rules__Output } from './validate/SInt32Rules';
|
||||
import type { SInt64Rules as _validate_SInt64Rules, SInt64Rules__Output as _validate_SInt64Rules__Output } from './validate/SInt64Rules';
|
||||
import type { StringRules as _validate_StringRules, StringRules__Output as _validate_StringRules__Output } from './validate/StringRules';
|
||||
import type { TimestampRules as _validate_TimestampRules, TimestampRules__Output as _validate_TimestampRules__Output } from './validate/TimestampRules';
|
||||
import type { UInt32Rules as _validate_UInt32Rules, UInt32Rules__Output as _validate_UInt32Rules__Output } from './validate/UInt32Rules';
|
||||
import type { UInt64Rules as _validate_UInt64Rules, UInt64Rules__Output as _validate_UInt64Rules__Output } from './validate/UInt64Rules';
|
||||
import type { OrcaLoadReport as _xds_data_orca_v3_OrcaLoadReport, OrcaLoadReport__Output as _xds_data_orca_v3_OrcaLoadReport__Output } from './xds/data/orca/v3/OrcaLoadReport';
|
||||
import type { OpenRcaServiceClient as _xds_service_orca_v3_OpenRcaServiceClient, OpenRcaServiceDefinition as _xds_service_orca_v3_OpenRcaServiceDefinition } from './xds/service/orca/v3/OpenRcaService';
|
||||
import type { OrcaLoadReportRequest as _xds_service_orca_v3_OrcaLoadReportRequest, OrcaLoadReportRequest__Output as _xds_service_orca_v3_OrcaLoadReportRequest__Output } from './xds/service/orca/v3/OrcaLoadReportRequest';
|
||||
|
||||
type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype> = {
|
||||
new(...args: ConstructorParameters<Constructor>): Subtype;
|
||||
};
|
||||
|
||||
export interface ProtoGrpcType {
|
||||
google: {
|
||||
protobuf: {
|
||||
DescriptorProto: MessageTypeDefinition<_google_protobuf_DescriptorProto, _google_protobuf_DescriptorProto__Output>
|
||||
Duration: MessageTypeDefinition<_google_protobuf_Duration, _google_protobuf_Duration__Output>
|
||||
Edition: EnumTypeDefinition
|
||||
EnumDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumDescriptorProto, _google_protobuf_EnumDescriptorProto__Output>
|
||||
EnumOptions: MessageTypeDefinition<_google_protobuf_EnumOptions, _google_protobuf_EnumOptions__Output>
|
||||
EnumValueDescriptorProto: MessageTypeDefinition<_google_protobuf_EnumValueDescriptorProto, _google_protobuf_EnumValueDescriptorProto__Output>
|
||||
EnumValueOptions: MessageTypeDefinition<_google_protobuf_EnumValueOptions, _google_protobuf_EnumValueOptions__Output>
|
||||
ExtensionRangeOptions: MessageTypeDefinition<_google_protobuf_ExtensionRangeOptions, _google_protobuf_ExtensionRangeOptions__Output>
|
||||
FeatureSet: MessageTypeDefinition<_google_protobuf_FeatureSet, _google_protobuf_FeatureSet__Output>
|
||||
FeatureSetDefaults: MessageTypeDefinition<_google_protobuf_FeatureSetDefaults, _google_protobuf_FeatureSetDefaults__Output>
|
||||
FieldDescriptorProto: MessageTypeDefinition<_google_protobuf_FieldDescriptorProto, _google_protobuf_FieldDescriptorProto__Output>
|
||||
FieldOptions: MessageTypeDefinition<_google_protobuf_FieldOptions, _google_protobuf_FieldOptions__Output>
|
||||
FileDescriptorProto: MessageTypeDefinition<_google_protobuf_FileDescriptorProto, _google_protobuf_FileDescriptorProto__Output>
|
||||
FileDescriptorSet: MessageTypeDefinition<_google_protobuf_FileDescriptorSet, _google_protobuf_FileDescriptorSet__Output>
|
||||
FileOptions: MessageTypeDefinition<_google_protobuf_FileOptions, _google_protobuf_FileOptions__Output>
|
||||
GeneratedCodeInfo: MessageTypeDefinition<_google_protobuf_GeneratedCodeInfo, _google_protobuf_GeneratedCodeInfo__Output>
|
||||
MessageOptions: MessageTypeDefinition<_google_protobuf_MessageOptions, _google_protobuf_MessageOptions__Output>
|
||||
MethodDescriptorProto: MessageTypeDefinition<_google_protobuf_MethodDescriptorProto, _google_protobuf_MethodDescriptorProto__Output>
|
||||
MethodOptions: MessageTypeDefinition<_google_protobuf_MethodOptions, _google_protobuf_MethodOptions__Output>
|
||||
OneofDescriptorProto: MessageTypeDefinition<_google_protobuf_OneofDescriptorProto, _google_protobuf_OneofDescriptorProto__Output>
|
||||
OneofOptions: MessageTypeDefinition<_google_protobuf_OneofOptions, _google_protobuf_OneofOptions__Output>
|
||||
ServiceDescriptorProto: MessageTypeDefinition<_google_protobuf_ServiceDescriptorProto, _google_protobuf_ServiceDescriptorProto__Output>
|
||||
ServiceOptions: MessageTypeDefinition<_google_protobuf_ServiceOptions, _google_protobuf_ServiceOptions__Output>
|
||||
SourceCodeInfo: MessageTypeDefinition<_google_protobuf_SourceCodeInfo, _google_protobuf_SourceCodeInfo__Output>
|
||||
SymbolVisibility: EnumTypeDefinition
|
||||
Timestamp: MessageTypeDefinition<_google_protobuf_Timestamp, _google_protobuf_Timestamp__Output>
|
||||
UninterpretedOption: MessageTypeDefinition<_google_protobuf_UninterpretedOption, _google_protobuf_UninterpretedOption__Output>
|
||||
}
|
||||
}
|
||||
validate: {
|
||||
AnyRules: MessageTypeDefinition<_validate_AnyRules, _validate_AnyRules__Output>
|
||||
BoolRules: MessageTypeDefinition<_validate_BoolRules, _validate_BoolRules__Output>
|
||||
BytesRules: MessageTypeDefinition<_validate_BytesRules, _validate_BytesRules__Output>
|
||||
DoubleRules: MessageTypeDefinition<_validate_DoubleRules, _validate_DoubleRules__Output>
|
||||
DurationRules: MessageTypeDefinition<_validate_DurationRules, _validate_DurationRules__Output>
|
||||
EnumRules: MessageTypeDefinition<_validate_EnumRules, _validate_EnumRules__Output>
|
||||
FieldRules: MessageTypeDefinition<_validate_FieldRules, _validate_FieldRules__Output>
|
||||
Fixed32Rules: MessageTypeDefinition<_validate_Fixed32Rules, _validate_Fixed32Rules__Output>
|
||||
Fixed64Rules: MessageTypeDefinition<_validate_Fixed64Rules, _validate_Fixed64Rules__Output>
|
||||
FloatRules: MessageTypeDefinition<_validate_FloatRules, _validate_FloatRules__Output>
|
||||
Int32Rules: MessageTypeDefinition<_validate_Int32Rules, _validate_Int32Rules__Output>
|
||||
Int64Rules: MessageTypeDefinition<_validate_Int64Rules, _validate_Int64Rules__Output>
|
||||
KnownRegex: EnumTypeDefinition
|
||||
MapRules: MessageTypeDefinition<_validate_MapRules, _validate_MapRules__Output>
|
||||
MessageRules: MessageTypeDefinition<_validate_MessageRules, _validate_MessageRules__Output>
|
||||
RepeatedRules: MessageTypeDefinition<_validate_RepeatedRules, _validate_RepeatedRules__Output>
|
||||
SFixed32Rules: MessageTypeDefinition<_validate_SFixed32Rules, _validate_SFixed32Rules__Output>
|
||||
SFixed64Rules: MessageTypeDefinition<_validate_SFixed64Rules, _validate_SFixed64Rules__Output>
|
||||
SInt32Rules: MessageTypeDefinition<_validate_SInt32Rules, _validate_SInt32Rules__Output>
|
||||
SInt64Rules: MessageTypeDefinition<_validate_SInt64Rules, _validate_SInt64Rules__Output>
|
||||
StringRules: MessageTypeDefinition<_validate_StringRules, _validate_StringRules__Output>
|
||||
TimestampRules: MessageTypeDefinition<_validate_TimestampRules, _validate_TimestampRules__Output>
|
||||
UInt32Rules: MessageTypeDefinition<_validate_UInt32Rules, _validate_UInt32Rules__Output>
|
||||
UInt64Rules: MessageTypeDefinition<_validate_UInt64Rules, _validate_UInt64Rules__Output>
|
||||
}
|
||||
xds: {
|
||||
data: {
|
||||
orca: {
|
||||
v3: {
|
||||
OrcaLoadReport: MessageTypeDefinition<_xds_data_orca_v3_OrcaLoadReport, _xds_data_orca_v3_OrcaLoadReport__Output>
|
||||
}
|
||||
}
|
||||
}
|
||||
service: {
|
||||
orca: {
|
||||
v3: {
|
||||
/**
|
||||
* Out-of-band (OOB) load reporting service for the additional load reporting
|
||||
* agent that does not sit in the request path. Reports are periodically sampled
|
||||
* with sufficient frequency to provide temporal association with requests.
|
||||
* OOB reporting compensates the limitation of in-band reporting in revealing
|
||||
* costs for backends that do not provide a steady stream of telemetry such as
|
||||
* long running stream operations and zero QPS services. This is a server
|
||||
* streaming service, client needs to terminate current RPC and initiate
|
||||
* a new call to change backend reporting frequency.
|
||||
*/
|
||||
OpenRcaService: SubtypeConstructor<typeof grpc.Client, _xds_service_orca_v3_OpenRcaServiceClient> & { service: _xds_service_orca_v3_OpenRcaServiceDefinition }
|
||||
OrcaLoadReportRequest: MessageTypeDefinition<_xds_service_orca_v3_OrcaLoadReportRequest, _xds_service_orca_v3_OrcaLoadReportRequest__Output>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
44
packages/grpc-js/src/generated/validate/AnyRules.ts
Normal file
44
packages/grpc-js/src/generated/validate/AnyRules.ts
Normal file
@ -0,0 +1,44 @@
|
||||
// Original file: proto/protoc-gen-validate/validate/validate.proto
|
||||
|
||||
|
||||
/**
|
||||
* AnyRules describe constraints applied exclusively to the
|
||||
* `google.protobuf.Any` well-known type
|
||||
*/
|
||||
export interface AnyRules {
|
||||
/**
|
||||
* Required specifies that this field must be set
|
||||
*/
|
||||
'required'?: (boolean);
|
||||
/**
|
||||
* In specifies that this field's `type_url` must be equal to one of the
|
||||
* specified values.
|
||||
*/
|
||||
'in'?: (string)[];
|
||||
/**
|
||||
* NotIn specifies that this field's `type_url` must not be equal to any of
|
||||
* the specified values.
|
||||
*/
|
||||
'not_in'?: (string)[];
|
||||
}
|
||||
|
||||
/**
|
||||
* AnyRules describe constraints applied exclusively to the
|
||||
* `google.protobuf.Any` well-known type
|
||||
*/
|
||||
export interface AnyRules__Output {
|
||||
/**
|
||||
* Required specifies that this field must be set
|
||||
*/
|
||||
'required': (boolean);
|
||||
/**
|
||||
* In specifies that this field's `type_url` must be equal to one of the
|
||||
* specified values.
|
||||
*/
|
||||
'in': (string)[];
|
||||
/**
|
||||
* NotIn specifies that this field's `type_url` must not be equal to any of
|
||||
* the specified values.
|
||||
*/
|
||||
'not_in': (string)[];
|
||||
}
|
||||
22
packages/grpc-js/src/generated/validate/BoolRules.ts
Normal file
22
packages/grpc-js/src/generated/validate/BoolRules.ts
Normal file
@ -0,0 +1,22 @@
|
||||
// Original file: proto/protoc-gen-validate/validate/validate.proto
|
||||
|
||||
|
||||
/**
|
||||
* BoolRules describes the constraints applied to `bool` values
|
||||
*/
|
||||
export interface BoolRules {
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const'?: (boolean);
|
||||
}
|
||||
|
||||
/**
|
||||
* BoolRules describes the constraints applied to `bool` values
|
||||
*/
|
||||
export interface BoolRules__Output {
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const': (boolean);
|
||||
}
|
||||
153
packages/grpc-js/src/generated/validate/BytesRules.ts
Normal file
153
packages/grpc-js/src/generated/validate/BytesRules.ts
Normal file
@ -0,0 +1,153 @@
|
||||
// Original file: proto/protoc-gen-validate/validate/validate.proto
|
||||
|
||||
import type { Long } from '@grpc/proto-loader';
|
||||
|
||||
/**
|
||||
* BytesRules describe the constraints applied to `bytes` values
|
||||
*/
|
||||
export interface BytesRules {
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const'?: (Buffer | Uint8Array | string);
|
||||
/**
|
||||
* MinLen specifies that this field must be the specified number of bytes
|
||||
* at a minimum
|
||||
*/
|
||||
'min_len'?: (number | string | Long);
|
||||
/**
|
||||
* MaxLen specifies that this field must be the specified number of bytes
|
||||
* at a maximum
|
||||
*/
|
||||
'max_len'?: (number | string | Long);
|
||||
/**
|
||||
* Pattern specifes that this field must match against the specified
|
||||
* regular expression (RE2 syntax). The included expression should elide
|
||||
* any delimiters.
|
||||
*/
|
||||
'pattern'?: (string);
|
||||
/**
|
||||
* Prefix specifies that this field must have the specified bytes at the
|
||||
* beginning of the string.
|
||||
*/
|
||||
'prefix'?: (Buffer | Uint8Array | string);
|
||||
/**
|
||||
* Suffix specifies that this field must have the specified bytes at the
|
||||
* end of the string.
|
||||
*/
|
||||
'suffix'?: (Buffer | Uint8Array | string);
|
||||
/**
|
||||
* Contains specifies that this field must have the specified bytes
|
||||
* anywhere in the string.
|
||||
*/
|
||||
'contains'?: (Buffer | Uint8Array | string);
|
||||
/**
|
||||
* In specifies that this field must be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'in'?: (Buffer | Uint8Array | string)[];
|
||||
/**
|
||||
* NotIn specifies that this field cannot be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'not_in'?: (Buffer | Uint8Array | string)[];
|
||||
/**
|
||||
* Ip specifies that the field must be a valid IP (v4 or v6) address in
|
||||
* byte format
|
||||
*/
|
||||
'ip'?: (boolean);
|
||||
/**
|
||||
* Ipv4 specifies that the field must be a valid IPv4 address in byte
|
||||
* format
|
||||
*/
|
||||
'ipv4'?: (boolean);
|
||||
/**
|
||||
* Ipv6 specifies that the field must be a valid IPv6 address in byte
|
||||
* format
|
||||
*/
|
||||
'ipv6'?: (boolean);
|
||||
/**
|
||||
* Len specifies that this field must be the specified number of bytes
|
||||
*/
|
||||
'len'?: (number | string | Long);
|
||||
/**
|
||||
* WellKnown rules provide advanced constraints against common byte
|
||||
* patterns
|
||||
*/
|
||||
'well_known'?: "ip"|"ipv4"|"ipv6";
|
||||
}
|
||||
|
||||
/**
|
||||
* BytesRules describe the constraints applied to `bytes` values
|
||||
*/
|
||||
export interface BytesRules__Output {
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const': (Buffer);
|
||||
/**
|
||||
* MinLen specifies that this field must be the specified number of bytes
|
||||
* at a minimum
|
||||
*/
|
||||
'min_len': (string);
|
||||
/**
|
||||
* MaxLen specifies that this field must be the specified number of bytes
|
||||
* at a maximum
|
||||
*/
|
||||
'max_len': (string);
|
||||
/**
|
||||
* Pattern specifes that this field must match against the specified
|
||||
* regular expression (RE2 syntax). The included expression should elide
|
||||
* any delimiters.
|
||||
*/
|
||||
'pattern': (string);
|
||||
/**
|
||||
* Prefix specifies that this field must have the specified bytes at the
|
||||
* beginning of the string.
|
||||
*/
|
||||
'prefix': (Buffer);
|
||||
/**
|
||||
* Suffix specifies that this field must have the specified bytes at the
|
||||
* end of the string.
|
||||
*/
|
||||
'suffix': (Buffer);
|
||||
/**
|
||||
* Contains specifies that this field must have the specified bytes
|
||||
* anywhere in the string.
|
||||
*/
|
||||
'contains': (Buffer);
|
||||
/**
|
||||
* In specifies that this field must be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'in': (Buffer)[];
|
||||
/**
|
||||
* NotIn specifies that this field cannot be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'not_in': (Buffer)[];
|
||||
/**
|
||||
* Ip specifies that the field must be a valid IP (v4 or v6) address in
|
||||
* byte format
|
||||
*/
|
||||
'ip'?: (boolean);
|
||||
/**
|
||||
* Ipv4 specifies that the field must be a valid IPv4 address in byte
|
||||
* format
|
||||
*/
|
||||
'ipv4'?: (boolean);
|
||||
/**
|
||||
* Ipv6 specifies that the field must be a valid IPv6 address in byte
|
||||
* format
|
||||
*/
|
||||
'ipv6'?: (boolean);
|
||||
/**
|
||||
* Len specifies that this field must be the specified number of bytes
|
||||
*/
|
||||
'len': (string);
|
||||
/**
|
||||
* WellKnown rules provide advanced constraints against common byte
|
||||
* patterns
|
||||
*/
|
||||
'well_known'?: "ip"|"ipv4"|"ipv6";
|
||||
}
|
||||
86
packages/grpc-js/src/generated/validate/DoubleRules.ts
Normal file
86
packages/grpc-js/src/generated/validate/DoubleRules.ts
Normal file
@ -0,0 +1,86 @@
|
||||
// Original file: proto/protoc-gen-validate/validate/validate.proto
|
||||
|
||||
|
||||
/**
|
||||
* DoubleRules describes the constraints applied to `double` values
|
||||
*/
|
||||
export interface DoubleRules {
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const'?: (number | string);
|
||||
/**
|
||||
* Lt specifies that this field must be less than the specified value,
|
||||
* exclusive
|
||||
*/
|
||||
'lt'?: (number | string);
|
||||
/**
|
||||
* Lte specifies that this field must be less than or equal to the
|
||||
* specified value, inclusive
|
||||
*/
|
||||
'lte'?: (number | string);
|
||||
/**
|
||||
* Gt specifies that this field must be greater than the specified value,
|
||||
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
||||
* range is reversed.
|
||||
*/
|
||||
'gt'?: (number | string);
|
||||
/**
|
||||
* Gte specifies that this field must be greater than or equal to the
|
||||
* specified value, inclusive. If the value of Gte is larger than a
|
||||
* specified Lt or Lte, the range is reversed.
|
||||
*/
|
||||
'gte'?: (number | string);
|
||||
/**
|
||||
* In specifies that this field must be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'in'?: (number | string)[];
|
||||
/**
|
||||
* NotIn specifies that this field cannot be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'not_in'?: (number | string)[];
|
||||
}
|
||||
|
||||
/**
|
||||
* DoubleRules describes the constraints applied to `double` values
|
||||
*/
|
||||
export interface DoubleRules__Output {
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const': (number);
|
||||
/**
|
||||
* Lt specifies that this field must be less than the specified value,
|
||||
* exclusive
|
||||
*/
|
||||
'lt': (number);
|
||||
/**
|
||||
* Lte specifies that this field must be less than or equal to the
|
||||
* specified value, inclusive
|
||||
*/
|
||||
'lte': (number);
|
||||
/**
|
||||
* Gt specifies that this field must be greater than the specified value,
|
||||
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
||||
* range is reversed.
|
||||
*/
|
||||
'gt': (number);
|
||||
/**
|
||||
* Gte specifies that this field must be greater than or equal to the
|
||||
* specified value, inclusive. If the value of Gte is larger than a
|
||||
* specified Lt or Lte, the range is reversed.
|
||||
*/
|
||||
'gte': (number);
|
||||
/**
|
||||
* In specifies that this field must be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'in': (number)[];
|
||||
/**
|
||||
* NotIn specifies that this field cannot be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'not_in': (number)[];
|
||||
}
|
||||
93
packages/grpc-js/src/generated/validate/DurationRules.ts
Normal file
93
packages/grpc-js/src/generated/validate/DurationRules.ts
Normal file
@ -0,0 +1,93 @@
|
||||
// Original file: proto/protoc-gen-validate/validate/validate.proto
|
||||
|
||||
import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../google/protobuf/Duration';
|
||||
|
||||
/**
|
||||
* DurationRules describe the constraints applied exclusively to the
|
||||
* `google.protobuf.Duration` well-known type
|
||||
*/
|
||||
export interface DurationRules {
|
||||
/**
|
||||
* Required specifies that this field must be set
|
||||
*/
|
||||
'required'?: (boolean);
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* Lt specifies that this field must be less than the specified value,
|
||||
* exclusive
|
||||
*/
|
||||
'lt'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* Lt specifies that this field must be less than the specified value,
|
||||
* inclusive
|
||||
*/
|
||||
'lte'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* Gt specifies that this field must be greater than the specified value,
|
||||
* exclusive
|
||||
*/
|
||||
'gt'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* Gte specifies that this field must be greater than the specified value,
|
||||
* inclusive
|
||||
*/
|
||||
'gte'?: (_google_protobuf_Duration | null);
|
||||
/**
|
||||
* In specifies that this field must be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'in'?: (_google_protobuf_Duration)[];
|
||||
/**
|
||||
* NotIn specifies that this field cannot be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'not_in'?: (_google_protobuf_Duration)[];
|
||||
}
|
||||
|
||||
/**
|
||||
* DurationRules describe the constraints applied exclusively to the
|
||||
* `google.protobuf.Duration` well-known type
|
||||
*/
|
||||
export interface DurationRules__Output {
|
||||
/**
|
||||
* Required specifies that this field must be set
|
||||
*/
|
||||
'required': (boolean);
|
||||
/**
|
||||
* Const specifies that this field must be exactly the specified value
|
||||
*/
|
||||
'const': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* Lt specifies that this field must be less than the specified value,
|
||||
* exclusive
|
||||
*/
|
||||
'lt': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* Lt specifies that this field must be less than the specified value,
|
||||
* inclusive
|
||||
*/
|
||||
'lte': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* Gt specifies that this field must be greater than the specified value,
|
||||
* exclusive
|
||||
*/
|
||||
'gt': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* Gte specifies that this field must be greater than the specified value,
|
||||
* inclusive
|
||||
*/
|
||||
'gte': (_google_protobuf_Duration__Output | null);
|
||||
/**
|
||||
* In specifies that this field must be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'in': (_google_protobuf_Duration__Output)[];
|
||||
/**
|
||||
* NotIn specifies that this field cannot be equal to one of the specified
|
||||
* values
|
||||
*/
|
||||
'not_in': (_google_protobuf_Duration__Output)[];
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user