You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/06 03:21:08 UTC

[GitHub] [apisix] shuaijinchao commented on a diff in pull request #6751: feat(zookeeper): support zookeeper service discovery

shuaijinchao commented on code in PR #6751:
URL: https://github.com/apache/apisix/pull/6751#discussion_r843424266


##########
docs/assets/images/apisix-seed.svg:
##########
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="833px" height="322px" viewBox="-0.5 -0.5 833 322" content="&lt;mxfile host=&quot;Electron&quot; modified=&quot;2022-04-03T05:49:18.486Z&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/17.2.4 Chrome/96.0.4664.174 Electron/16.1.0 Safari/537.36&quot; etag=&quot;wXR8hLJQ5RhEoX-8Eujk&quot; version=&quot;17.2.4&quot; type=&quot;device&quot;&gt;&lt;diagram id=&quot;229I2xH1ZpOIAD6xua3H&quot; name=&quot;第 1 页&quot;&gt;5Vpbc5s4FP41zHQf3EESYPzoOE6b3exMp8lOk7zJIANbQBTkxO6vr2TETWDHFxxnkhcbHV0sne87n46ENTSJll9SnPj/UpeEGtTdpYYuNQjBCCH+JSyr3GKPYG7w0sCVjSrDbfCbSKMurYvAJVmjIaM0ZEHSNDo0jonDGjacpvS52WxOw+avJtgjLcOtg8O29UfgMl+uAg4r+1cSeH7xy8Aa5TURLhrLlWQ+dulzzYSmGpqklLL8KVpOSCicV/gl73e1obacWEpitkuH77/w47Xxz+UUPd7rd3+TH3GEBsXknnC4kCsef7u+vb4f3E6nl3LibFV4I6WL2CViQKChi2c/YOQ2wY6ofeb4c5vPolBWZyylP0uv8fVezGnM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C9VOuS6tk/53Dn3h+eUTwONFNUbHSafpj5s6vBry2d7f7dK5fovcTETkkWY475rYRq+JExwNLSawmT0sw+/mhKNWkCD2gsAL8gEWnw9dCEgV7Dmnmang1kcDvPtuJaiFyl2TGOi5OOFaT927J6Gt96RDjvScNChLvBUaXjx14QaerBE74qHp3h54waZQ/nCxUrYKhGBi2O3kXvEOPro4JrKSRZ2nLGg8argtt+Oo67QrGAMhUnktuSJyH3h4wIK9JcBBfarAgpbgBpdgFLxsSg22RLeD43mwIRN7R11oDnsB01erP5sl2+01V8W0fQP&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);"><defs><style type="text/css">@import url(https://fonts.googleapis.com/css?family=Nanum+Gothic);&#xa;</style></defs><g><rect x="392" y="1" width="130" height="50" rx="7.5" ry="7.5" fill="#d5e8d4" stroke="#82b366" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justi
 fy-content: unsafe center; width: 128px; height: 1px; padding-top: 26px; margin-left: 393px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">APISIX-SEED</div></div></div></foreignObject><text x="457" y="30" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">APISIX-SEED</text></switch></g><path d="M 692 296 L 682 296 L 682 291 L 722 291 L 722 186 L 700.24 186" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 694.24 186 L 702.24 182 L 700.24 186 L 702.24 190 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/><rect x="562" y="271" width="130" height="50" rx="7.5" ry="7.5" fill="#dae8fc" stroke="#6c8eb
 f" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 296px; margin-left: 563px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">APISIX</div></div></div></foreignObject><text x="627" y="300" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">APISIX</text></switch></g><path d="M 627 211 L 627 262.76" fill="none" stroke="rgb(0, 0, 0)" stroke-width="
 2" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 627 268.76 L 623 260.76 L 627 262.76 L 631 260.76 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 235px; margin-left: 628px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">7、Refresh memory</
 div></div></div></foreignObject><text x="628" y="238" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="11px" text-anchor="middle">7、Refresh memory</text></switch></g><rect x="562" y="161" width="130" height="50" rx="7.5" ry="7.5" fill="#dae8fc" stroke="#6c8ebf" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 186px; margin-left: 563px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow
 -wrap: normal;">ETCD</div></div></div></foreignObject><text x="627" y="190" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">ETCD</text></switch></g><path d="M 627 161 L 527.06 32.5" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 523.37 27.76 L 531.44 31.62 L 527.06 32.5 L 525.13 36.54 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/><rect x="210" y="161" width="130" height="50" rx="7.5" ry="7.5" fill="#dae8fc" stroke="#6c8ebf" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; pad
 ding-top: 186px; margin-left: 211px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Zookeeper</div></div></div></foreignObject><text x="275" y="190" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">Zookeeper</text></switch></g><path d="M 392 26 L 280.39 154.78" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 276.46 159.31 L 278.68 150.65 L 280.39 154.78 L 284.73 155.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/><path d="M 210 296 L 182 296 Q 172 296 172 286 L 172 196 Q 172 186 182 186 L 201.76 186" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events=
 "stroke"/><path d="M 207.76 186 L 199.76 190 L 201.76 186 L 199.76 182 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/><rect x="210" y="271" width="130" height="50" rx="7.5" ry="7.5" fill="#dae8fc" stroke="#6c8ebf" stroke-width="2" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 296px; margin-left: 211px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; o
 verflow-wrap: normal;">CLI</div></div></div></foreignObject><text x="275" y="300" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">CLI</text></switch></g><path d="M 340 186 L 451.61 57.22" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 455.54 52.69 L 453.32 61.35 L 451.61 57.22 L 447.27 56.12 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 133px; margin-left: 404px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style=
 "box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;"><span style="font-size: 12px ; background-color: rgb(248 , 249 , 250)">5、Get service changes</span></div></div></div></foreignObject><text x="404" y="136" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="11px" text-anchor="middle">5、Get service changes</text></switch></g><path d="M 457 51 L 556.94 179.5" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 560.63 184.24 L 552.56 180.38 L 556.94 179.5 L 558.87 175.46 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG1
 1/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 101px; margin-left: 493px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">6、Update etcd</div></div></div></foreignObject><text x="493" y="105" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="11px" text-anchor="middle">6、Update etcd</text></switch></g><rect x="722" y="211" width="110" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" req
 uiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 221px; margin-left: 777px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">1、Register route</div></div></div></foreignObject><text x="777" y="225" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">1、Register route</text></switch></g><rect x="572" y="71" width="240" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or
 g/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 81px; margin-left: 692px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">2、Fetch discovery type and service name</div></div></div></foreignObject><text x="692" y="85" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">2、Fetch discovery type and service name</text></switch></g><rect x="152" y="71" width="180" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="htt
 p://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 81px; margin-left: 242px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">3、Register service listen event</div></div></div></foreignObject><text x="242" y="85" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">3、Register service listen event</text></switch></g><rect x="0" y="231" width="170" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://
 www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 241px; margin-left: 85px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">4、Register or update service</div></div></div></foreignObject><text x="85" y="245" fill="rgb(0, 0, 0)" font-family="Tahoma" font-size="12px" text-anchor="middle">4、Register or update service</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-s
 ize="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>

Review Comment:
   updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org