├── .gitignore ├── README.md └── gdebug ├── LICENSE ├── README.md ├── buildscripts ├── channelz_codgen.sh └── update_angular.sh ├── docker ├── codegen │ ├── Dockerfile │ └── shared_dir │ │ ├── .gitkeep │ │ └── scripts │ │ └── gen_channelz_pb.sh ├── envoy │ ├── Dockerfile │ └── zprox.sh ├── start_docker.sh └── static-assets │ ├── Dockerfile │ ├── dist_channelz │ ├── 3rdpartylicenses.txt │ ├── index.html │ ├── main.js │ ├── main.js.map │ ├── polyfills.js │ ├── polyfills.js.map │ ├── runtime.js │ ├── runtime.js.map │ ├── scripts.js │ ├── scripts.js.map │ ├── styles.js │ ├── styles.js.map │ ├── vendor.js │ └── vendor.js.map │ └── static_assets_server.go ├── github └── screenshots │ ├── servers.png │ └── socket.png └── web └── channelzui ├── .editorconfig ├── README.md ├── angular.json ├── e2e ├── app.e2e-spec.ts ├── app.po.ts └── tsconfig.e2e.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── protractor.conf.js ├── src ├── app │ ├── app-routing.module.ts │ ├── app.component.css │ ├── app.component.html │ ├── app.component.ts │ ├── app.module.ts │ ├── channel │ │ ├── channel.component.css │ │ ├── channel.component.html │ │ └── channel.component.ts │ ├── channelz.service.ts │ ├── help │ │ ├── help.component.css │ │ ├── help.component.html │ │ └── help.component.ts │ ├── server-sockets │ │ ├── server-sockets.component.css │ │ ├── server-sockets.component.html │ │ └── server-sockets.component.ts │ ├── servers │ │ ├── servers.component.css │ │ ├── servers.component.html │ │ └── servers.component.ts │ ├── socket │ │ ├── socket.component.css │ │ ├── socket.component.html │ │ └── socket.component.ts │ ├── subchannel │ │ ├── subchannel.component.css │ │ ├── subchannel.component.html │ │ └── subchannel.component.ts │ ├── top-channels │ │ ├── top-channels.component.css │ │ ├── top-channels.component.html │ │ └── top-channels.component.ts │ └── utils.ts ├── assets │ └── .gitkeep ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.png ├── generated │ └── channelz.js ├── index.html ├── main.ts ├── polyfills.ts ├── styles.css ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json └── typings.d.ts ├── tsconfig.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | target/ 3 | pom.xml.tag 4 | pom.xml.releaseBackup 5 | pom.xml.versionsBackup 6 | pom.xml.next 7 | release.properties 8 | 9 | # OS X 10 | .DS_Store 11 | 12 | # XCode 13 | build/ 14 | DerivedData 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | *.xcuserstate 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Experiments and proposals for gRPC features. 2 | 3 | The purpose of this repository is to have a single place for people to push code and various documentation that gravitate around experimenting with new features for gRPC. This repository isn't tested, and will be lightly curated, so the code here should not be considered production-worthy (and it may not be functional at all). 4 | 5 | Some of the experiments conducted here might be cherry-picked for being introduced as an actual pull request on our main repositories. 6 | -------------------------------------------------------------------------------- /gdebug/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /gdebug/README.md: -------------------------------------------------------------------------------- 1 | Experimental warning 2 | ==================== 3 | 4 | This tool is a proof of concept, but feedback is welcome. 5 | 6 | Description 7 | =========== 8 | 9 | gRPC provides debug stats in the form of an RPC service. For example, 10 | [channelz](https://github.com/grpc/proposal/blob/master/A14-channelz.md) 11 | is a service that provides channel level debug information. This repo 12 | contains a tool that connects to a remote gRPC `channelz` service and 13 | displays the data as a web page using a local `golang` web server. 14 | The goal is to provide a single CLI tool that can display all gRPC 15 | debug pages. 16 | 17 | A screenshot of servers page: 18 | ![image](github/screenshots/servers.png) 19 | 20 | A screenshot of a detailed socket page: 21 | ![image](github/screenshots/socket.png) 22 | 23 | Design 24 | ====== 25 | 26 | The tool has three components: 27 | 28 | 1. Your web browser. 29 | 2. An Envoy proxy to translate gRPC web requests and fetch static 30 | assets. 31 | 3. A web server to serve static assets, namely the Angular app's HTML 32 | and Javascript files. 33 | 34 | When your web browser first hits the Envoy port, the proxy looks at 35 | the content type and determines that it is not a gRPC-web request. As 36 | a result, it routes the request to the static assets web server and 37 | your web browser loads the Angular webapp. 38 | 39 | When the web app needs channelz data, it will make gRPC-web requests 40 | to the Envoy port. Envoy uses the content type to detect these 41 | requests to translate and route them to the gRPC host. 42 | 43 | For more info look at: 44 | `docker/envoy/zprox.sh` 45 | `web/channelzui/src/app/channelz.service.ts` 46 | 47 | 48 | Running the tool 49 | ================ 50 | 51 | This example shows how to connect the tool to a gRPC service runnning 52 | [channelz](https://github.com/grpc/proposal/blob/master/A14-channelz.md) 53 | at `127.0.0.1:50051`. The envoy proxy listens on port `9900`. 54 | 55 | ```bash 56 | # Make sure 'docker-compose' and 'docker' are both available 57 | $ cd docker 58 | $ ./start_docker.sh 9900 127.0.0.1 50051 59 | ``` 60 | 61 | 62 | Compile instructions for the web app 63 | ==================================== 64 | 65 | Normally, rebuilding the web app is not necessary. The compiled 66 | javascript and HTML files are already present in the static assets 67 | docker directory. 68 | 69 | `npm` is required to be on your `PATH`. This code has been verified to 70 | work with version `5.8.0` of `npm`. 71 | 72 | If this is your first time building the app: 73 | ```bash 74 | cd web/channelzui/ 75 | npm install 76 | ``` 77 | 78 | To rebuild and copy the distributable files: 79 | 80 | ```bash 81 | # Pull the latest proto definitions from 82 | # https://github.com/grpc/grpc-proto 83 | $ buildscripts/channelz_codegen.sh 84 | 85 | # Rebuild the angular app 86 | $ buildscripts/update_angular.sh 87 | ``` 88 | -------------------------------------------------------------------------------- /gdebug/buildscripts/channelz_codgen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu -o pipefail 3 | 4 | if [ "$#" -gt 1 ]; then 5 | echo "Usage: $0 [GRPC_PROTO_REPO_SHA]" 6 | echo "GRPC_PROTO_SHA defaults to 'origin/master'" 7 | fi 8 | 9 | # Check out a known good SHA for reproducibility 10 | readonly GRPC_WEB_SHA=6357fa78f36d2e08636612f281250b31f28ae6ec 11 | readonly GRPC_PROTO_SHA="${1:-origin/master}" 12 | 13 | readonly GRPC_ZPAGES_DIR="$(cd "$(dirname "$0")"/.. && pwd)" 14 | readonly GITHUB_DIR="$GRPC_ZPAGES_DIR"/buildscripts/github/ 15 | 16 | if [[ ! -d "$GITHUB_DIR"/grpc-web ]]; then 17 | mkdir -p "$GITHUB_DIR" 18 | cd "$GITHUB_DIR" 19 | git clone https://github.com/grpc/grpc-web.git 20 | fi 21 | cd "$GITHUB_DIR"/grpc-web/ 22 | git checkout "$GRPC_WEB_SHA" 23 | 24 | cd "$GITHUB_DIR"/grpc-web//net/grpc/gateway/docker 25 | docker build -t channelz_grpc_web_prereqs ./prereqs/ 26 | 27 | cd "$GRPC_ZPAGES_DIR"/docker 28 | docker build -t channelz_codegen codegen 29 | 30 | docker run --rm -v "$GRPC_ZPAGES_DIR"/docker/codegen/shared_dir:/shared_dir/ channelz_codegen bash -c "function fixFiles() { chown -R $(id -u):$(id -g) /shared_dir; }; trap fixFiles EXIT; /shared_dir/scripts/gen_channelz_pb.sh $GRPC_PROTO_SHA" 31 | 32 | mv "$GRPC_ZPAGES_DIR"/docker/codegen/shared_dir/gen_out/channelz.js "$GRPC_ZPAGES_DIR"/web/channelzui/src/generated/channelz.js 33 | -------------------------------------------------------------------------------- /gdebug/buildscripts/update_angular.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eux -o pipefail 3 | 4 | readonly GRPC_ZPAGES_DIR="$(cd "$(dirname "$0")"/.. && pwd)" 5 | 6 | SRC_DIR="$GRPC_ZPAGES_DIR/web/channelzui/" 7 | cd "$SRC_DIR" 8 | 9 | rm -rf "$GRPC_ZPAGES_DIR/docker/static-assets/dist_channelz/" 10 | 11 | if [[ $(which ng) == "" ]]; then 12 | echo "ng is not on the path, you must run 'npm install' in $SRC_DIR" 13 | exit 1 14 | fi 15 | 16 | ng build --base-href=/dist_channelz/ 17 | -------------------------------------------------------------------------------- /gdebug/docker/codegen/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM channelz_grpc_web_prereqs:latest 2 | 3 | RUN cd /github/grpc-web/javascript/net/grpc/web/ && make 4 | 5 | RUN cd /github/grpc-web && \ 6 | curl http://dl.google.com/closure-compiler/compiler-latest.zip \ 7 | -o compiler-latest.zip && \ 8 | rm -f closure-compiler.jar && \ 9 | unzip -p -qq -o compiler-latest.zip *.jar > closure-compiler.jar 10 | 11 | -------------------------------------------------------------------------------- /gdebug/docker/codegen/shared_dir/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-experiments/2ec1d0aeb5503188169c9cd7992b8db4a6472365/gdebug/docker/codegen/shared_dir/.gitkeep -------------------------------------------------------------------------------- /gdebug/docker/codegen/shared_dir/scripts/gen_channelz_pb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu -o pipefail 3 | 4 | if [ "$#" -ne 1 ]; then 5 | echo "Usage: $0 GRPC_PROTO_SHA" 6 | fi 7 | 8 | readonly GRPC_PROTO_SHA="$1" 9 | readonly SHARED_DIR="$(cd "$(dirname "$0")"/.. && pwd)" 10 | 11 | mkdir -p /github 12 | cd /github/ 13 | git clone https://github.com/grpc/grpc-proto.git 14 | cd /github/grpc-proto 15 | git checkout "$GRPC_PROTO_SHA" 16 | 17 | readonly WORKSPACE="/workspace" 18 | mkdir -p "$WORKSPACE" 19 | 20 | # Run protoc and generate .js for msg types 21 | protoc -I=/github/grpc-proto/grpc/channelz/v1/ --js_out=import_style=closure,binary:"$WORKSPACE" channelz.proto 22 | protoc -I=/github/grpc-web/third_party/grpc/third_party/protobuf/src/ --js_out=import_style=closure,binary:"$WORKSPACE" google/protobuf/any.proto google/protobuf/duration.proto google/protobuf/timestamp.proto google/protobuf/wrappers.proto 23 | 24 | # Run protoc with grpc-web plugin to generate client 25 | protoc -I=/github/grpc-proto/grpc/channelz/v1/ --plugin=protoc-gen-grpc-web=/github/grpc-web/javascript/net/grpc/web/protoc-gen-grpc-web --grpc-web_out=out=channelz.grpc.pb.js,mode=grpcweb:"$WORKSPACE" channelz.proto 26 | 27 | # Run closure compiler to produce a self contained .js file 28 | mkdir -p "$SHARED_DIR"/gen_out/ 29 | java \ 30 | -jar /github/grpc-web/closure-compiler.jar \ 31 | --js "$WORKSPACE" \ 32 | --js /github/grpc-web/javascript \ 33 | --js /github/grpc-web/net \ 34 | --js /github/grpc-web/third_party/closure-library \ 35 | --js /github/grpc-web/third_party/grpc/third_party/protobuf/js \ 36 | --entry_point=goog:proto.grpc.channelz.v1.ChannelzClient \ 37 | --entry_point=goog:proto.grpc.channelz.v1.SocketOptionTimeout \ 38 | --entry_point=goog:proto.grpc.channelz.v1.SocketOptionLinger \ 39 | --entry_point=goog:proto.grpc.channelz.v1.SocketOptionTcpInfo \ 40 | --dependency_mode=STRICT \ 41 | --js_output_file "$SHARED_DIR"/gen_out/channelz.js 42 | -------------------------------------------------------------------------------- /gdebug/docker/envoy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM envoyproxy/envoy:v1.7.0 2 | RUN mkdir /tmp/envoy/ 3 | RUN mkdir /zprox/ 4 | COPY ./zprox.sh /zprox/ 5 | ENTRYPOINT /zprox/zprox.sh ${ENVOY_PORT} ${GRPC_HOST} ${GRPC_PORT} ${ASSETS_HOST} ${ASSETS_PORT} 6 | -------------------------------------------------------------------------------- /gdebug/docker/envoy/zprox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu -o pipefail 4 | 5 | if [ "$#" -ne 5 ]; then 6 | echo "Usage: ./zprox localport grpcaddr grpcport assetsaddr assetsport" 7 | echo "localport: the port envoy proxy should listen" 8 | echo "grpcaddr, grpcport: the addr+port of the gRPC service" 9 | echo "assetsaddr, assetsport: the ip+port of the web server serving zpages assets (html, js, etc)" 10 | exit 1 11 | fi 12 | 13 | 14 | TEMP=$(mktemp --suffix=.yaml) 15 | function finish { 16 | rm "$TEMP" 17 | } 18 | trap finish EXIT 19 | 20 | readonly LOCAL_PORT=$1 21 | readonly GRPC_ADDR=$2 22 | readonly GRPC_PORT=$3 23 | readonly ASSETS_ADDR=$4 24 | readonly ASSETS_PORT=$5 25 | 26 | readonly GDEBUG_TOKEN_NAME="gdebug-xsrf-token" 27 | 28 | cat > "$TEMP" < 2 | 3 | 4 | 5 | Channelz 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /gdebug/docker/static-assets/dist_channelz/runtime.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // install a JSONP callback for chunk loading 3 | /******/ function webpackJsonpCallback(data) { 4 | /******/ var chunkIds = data[0]; 5 | /******/ var moreModules = data[1]; 6 | /******/ var executeModules = data[2]; 7 | /******/ // add "moreModules" to the modules object, 8 | /******/ // then flag all "chunkIds" as loaded and fire callback 9 | /******/ var moduleId, chunkId, i = 0, resolves = []; 10 | /******/ for(;i < chunkIds.length; i++) { 11 | /******/ chunkId = chunkIds[i]; 12 | /******/ if(installedChunks[chunkId]) { 13 | /******/ resolves.push(installedChunks[chunkId][0]); 14 | /******/ } 15 | /******/ installedChunks[chunkId] = 0; 16 | /******/ } 17 | /******/ for(moduleId in moreModules) { 18 | /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { 19 | /******/ modules[moduleId] = moreModules[moduleId]; 20 | /******/ } 21 | /******/ } 22 | /******/ if(parentJsonpFunction) parentJsonpFunction(data); 23 | /******/ while(resolves.length) { 24 | /******/ resolves.shift()(); 25 | /******/ } 26 | /******/ 27 | /******/ // add entry modules from loaded chunk to deferred list 28 | /******/ deferredModules.push.apply(deferredModules, executeModules || []); 29 | /******/ 30 | /******/ // run deferred modules when all chunks ready 31 | /******/ return checkDeferredModules(); 32 | /******/ }; 33 | /******/ function checkDeferredModules() { 34 | /******/ var result; 35 | /******/ for(var i = 0; i < deferredModules.length; i++) { 36 | /******/ var deferredModule = deferredModules[i]; 37 | /******/ var fulfilled = true; 38 | /******/ for(var j = 1; j < deferredModule.length; j++) { 39 | /******/ var depId = deferredModule[j]; 40 | /******/ if(installedChunks[depId] !== 0) fulfilled = false; 41 | /******/ } 42 | /******/ if(fulfilled) { 43 | /******/ deferredModules.splice(i--, 1); 44 | /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); 45 | /******/ } 46 | /******/ } 47 | /******/ return result; 48 | /******/ } 49 | /******/ 50 | /******/ // The module cache 51 | /******/ var installedModules = {}; 52 | /******/ 53 | /******/ // object to store loaded and loading chunks 54 | /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 55 | /******/ // Promise = chunk loading, 0 = chunk loaded 56 | /******/ var installedChunks = { 57 | /******/ "runtime": 0 58 | /******/ }; 59 | /******/ 60 | /******/ var deferredModules = []; 61 | /******/ 62 | /******/ // The require function 63 | /******/ function __webpack_require__(moduleId) { 64 | /******/ 65 | /******/ // Check if module is in cache 66 | /******/ if(installedModules[moduleId]) { 67 | /******/ return installedModules[moduleId].exports; 68 | /******/ } 69 | /******/ // Create a new module (and put it into the cache) 70 | /******/ var module = installedModules[moduleId] = { 71 | /******/ i: moduleId, 72 | /******/ l: false, 73 | /******/ exports: {} 74 | /******/ }; 75 | /******/ 76 | /******/ // Execute the module function 77 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 78 | /******/ 79 | /******/ // Flag the module as loaded 80 | /******/ module.l = true; 81 | /******/ 82 | /******/ // Return the exports of the module 83 | /******/ return module.exports; 84 | /******/ } 85 | /******/ 86 | /******/ 87 | /******/ // expose the modules object (__webpack_modules__) 88 | /******/ __webpack_require__.m = modules; 89 | /******/ 90 | /******/ // expose the module cache 91 | /******/ __webpack_require__.c = installedModules; 92 | /******/ 93 | /******/ // define getter function for harmony exports 94 | /******/ __webpack_require__.d = function(exports, name, getter) { 95 | /******/ if(!__webpack_require__.o(exports, name)) { 96 | /******/ Object.defineProperty(exports, name, { 97 | /******/ configurable: false, 98 | /******/ enumerable: true, 99 | /******/ get: getter 100 | /******/ }); 101 | /******/ } 102 | /******/ }; 103 | /******/ 104 | /******/ // define __esModule on exports 105 | /******/ __webpack_require__.r = function(exports) { 106 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 107 | /******/ }; 108 | /******/ 109 | /******/ // getDefaultExport function for compatibility with non-harmony modules 110 | /******/ __webpack_require__.n = function(module) { 111 | /******/ var getter = module && module.__esModule ? 112 | /******/ function getDefault() { return module['default']; } : 113 | /******/ function getModuleExports() { return module; }; 114 | /******/ __webpack_require__.d(getter, 'a', getter); 115 | /******/ return getter; 116 | /******/ }; 117 | /******/ 118 | /******/ // Object.prototype.hasOwnProperty.call 119 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 120 | /******/ 121 | /******/ // __webpack_public_path__ 122 | /******/ __webpack_require__.p = ""; 123 | /******/ 124 | /******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; 125 | /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); 126 | /******/ jsonpArray.push = webpackJsonpCallback; 127 | /******/ jsonpArray = jsonpArray.slice(); 128 | /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); 129 | /******/ var parentJsonpFunction = oldJsonpFunction; 130 | /******/ 131 | /******/ 132 | /******/ // run deferred modules from other chunks 133 | /******/ checkDeferredModules(); 134 | /******/ }) 135 | /************************************************************************/ 136 | /******/ ([]); 137 | //# sourceMappingURL=runtime.js.map -------------------------------------------------------------------------------- /gdebug/docker/static-assets/dist_channelz/runtime.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAiB,4BAA4B;AAC7C;AACA;AACA,0BAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAgB,uBAAuB;AACvC;;;AAGA;AACA","file":"runtime.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"runtime\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /gdebug/docker/static-assets/dist_channelz/styles.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["styles"],{ 2 | 3 | /***/ "./node_modules/raw-loader/index.js!./node_modules/postcss-loader/lib/index.js??embedded!./src/styles.css": 4 | /*!**********************************************************************************************!*\ 5 | !*** ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./src/styles.css ***! 6 | \**********************************************************************************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports) { 9 | 10 | module.exports = "/* You can add global styles to this file, and also import other style files */\n\nbody {\n margin: 0;\n font-family: Roboto, sans-serif;\n}\n\n" 11 | 12 | /***/ }), 13 | 14 | /***/ "./node_modules/style-loader/lib/addStyles.js": 15 | /*!****************************************************!*\ 16 | !*** ./node_modules/style-loader/lib/addStyles.js ***! 17 | \****************************************************/ 18 | /*! no static exports found */ 19 | /***/ (function(module, exports, __webpack_require__) { 20 | 21 | /* 22 | MIT License http://www.opensource.org/licenses/mit-license.php 23 | Author Tobias Koppers @sokra 24 | */ 25 | 26 | var stylesInDom = {}; 27 | 28 | var memoize = function (fn) { 29 | var memo; 30 | 31 | return function () { 32 | if (typeof memo === "undefined") memo = fn.apply(this, arguments); 33 | return memo; 34 | }; 35 | }; 36 | 37 | var isOldIE = memoize(function () { 38 | // Test for IE <= 9 as proposed by Browserhacks 39 | // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 40 | // Tests for existence of standard globals is to allow style-loader 41 | // to operate correctly into non-standard environments 42 | // @see https://github.com/webpack-contrib/style-loader/issues/177 43 | return window && document && document.all && !window.atob; 44 | }); 45 | 46 | var getTarget = function (target) { 47 | return document.querySelector(target); 48 | }; 49 | 50 | var getElement = (function (fn) { 51 | var memo = {}; 52 | 53 | return function(target) { 54 | // If passing function in options, then use it for resolve "head" element. 55 | // Useful for Shadow Root style i.e 56 | // { 57 | // insertInto: function () { return document.querySelector("#foo").shadowRoot } 58 | // } 59 | if (typeof target === 'function') { 60 | return target(); 61 | } 62 | if (typeof memo[target] === "undefined") { 63 | var styleTarget = getTarget.call(this, target); 64 | // Special case to return head of iframe instead of iframe itself 65 | if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { 66 | try { 67 | // This will throw an exception if access to iframe is blocked 68 | // due to cross-origin restrictions 69 | styleTarget = styleTarget.contentDocument.head; 70 | } catch(e) { 71 | styleTarget = null; 72 | } 73 | } 74 | memo[target] = styleTarget; 75 | } 76 | return memo[target] 77 | }; 78 | })(); 79 | 80 | var singleton = null; 81 | var singletonCounter = 0; 82 | var stylesInsertedAtTop = []; 83 | 84 | var fixUrls = __webpack_require__(/*! ./urls */ "./node_modules/style-loader/lib/urls.js"); 85 | 86 | module.exports = function(list, options) { 87 | if (typeof DEBUG !== "undefined" && DEBUG) { 88 | if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); 89 | } 90 | 91 | options = options || {}; 92 | 93 | options.attrs = typeof options.attrs === "object" ? options.attrs : {}; 94 | 95 | // Force single-tag solution on IE6-9, which has a hard limit on the # of