├── .editorconfig ├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── Makefile ├── README.md ├── databaseservice ├── Dockerfile ├── README.md └── data │ └── data.sql ├── docs └── setup.md ├── frontendservice ├── .dockerignore ├── Cargo.toml ├── Dockerfile ├── README.md ├── build.rs ├── proto │ └── quotation.proto └── src │ └── main.rs ├── kind-config.yaml ├── manifests ├── databaseservice.yaml ├── frontendservice.yaml └── quotationservice.yaml ├── proto └── quotation.proto ├── quotationservice ├── .dockerignore ├── Cargo.toml ├── Dockerfile ├── README.md ├── build.rs ├── proto │ └── quotation.proto └── src │ └── main.rs ├── rustfmt.toml └── skaffold.yaml /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [Makefile] 15 | indent_style = tab 16 | 17 | [*.{yml,yaml,json}] 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sql filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to rust-k8s-demo 2 | 3 | Thank you for helping us improve the project. 4 | 5 | ## Getting started 6 | 7 | [setup](../docs/setup.md) has instructions on how to run this project. 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: cargo 4 | directory: "." 5 | schedule: 6 | interval: weekly 7 | time: "08:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Build & test project 2 | 3 | on: 4 | push: 5 | schedule: 6 | - cron: "0 6 * * *" 7 | 8 | jobs: 9 | build: 10 | name: Build & check format 11 | if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Install Protoc 16 | uses: arduino/setup-protoc@v3 17 | with: 18 | repo-token: ${{ secrets.GITHUB_TOKEN }} 19 | - name: Install clippy on stable 20 | uses: dtolnay/rust-toolchain@stable 21 | with: 22 | components: clippy 23 | - run: cargo build 24 | - run: cargo clippy --all-targets --all-features -- -D warnings 25 | - name: Set nightly for cargo fmt 26 | uses: dtolnay/rust-toolchain@nightly 27 | with: 28 | components: rustfmt 29 | - run: cargo +nightly fmt -- --check 30 | 31 | integration-test: 32 | name: Integration test 33 | if: "!contains(github.event.head_commit.message, 'e2e skip') && !contains(github.event.head_commit.message, 'skip e2e')" 34 | runs-on: ubuntu-latest 35 | steps: 36 | - uses: actions/checkout@v4 37 | with: 38 | lfs: true 39 | - uses: actions/setup-go@v5 40 | with: 41 | go-version: 1.22 42 | - name: Install latest version of Kind 43 | run: go install sigs.k8s.io/kind@v0.20.0 44 | - run: PATH=$(go env GOPATH)/bin:$PATH kind version 45 | - name: Create Kind cluster 46 | run: PATH=$(go env GOPATH)/bin:$PATH kind create cluster --config kind-config.yaml 47 | - name: Install skaffold 48 | run: | 49 | curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 50 | chmod +x skaffold 51 | sudo mv skaffold /usr/local/bin 52 | - run: skaffold version 53 | - run: make bootstrap 54 | - run: make e2e 55 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | *.rs.bk 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.20.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "1.0.2" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "anyhow" 31 | version = "1.0.72" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" 34 | 35 | [[package]] 36 | name = "async-stream" 37 | version = "0.3.5" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" 40 | dependencies = [ 41 | "async-stream-impl", 42 | "futures-core", 43 | "pin-project-lite", 44 | ] 45 | 46 | [[package]] 47 | name = "async-stream-impl" 48 | version = "0.3.5" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" 51 | dependencies = [ 52 | "proc-macro2", 53 | "quote", 54 | "syn", 55 | ] 56 | 57 | [[package]] 58 | name = "async-trait" 59 | version = "0.1.72" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" 62 | dependencies = [ 63 | "proc-macro2", 64 | "quote", 65 | "syn", 66 | ] 67 | 68 | [[package]] 69 | name = "atomic-waker" 70 | version = "1.1.2" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 73 | 74 | [[package]] 75 | name = "autocfg" 76 | version = "1.1.0" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 79 | 80 | [[package]] 81 | name = "axum" 82 | version = "0.7.9" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" 85 | dependencies = [ 86 | "async-trait", 87 | "axum-core", 88 | "bytes", 89 | "futures-util", 90 | "http", 91 | "http-body", 92 | "http-body-util", 93 | "hyper", 94 | "hyper-util", 95 | "itoa", 96 | "matchit", 97 | "memchr", 98 | "mime", 99 | "percent-encoding", 100 | "pin-project-lite", 101 | "rustversion", 102 | "serde", 103 | "serde_json", 104 | "serde_path_to_error", 105 | "serde_urlencoded", 106 | "sync_wrapper", 107 | "tokio", 108 | "tower 0.5.2", 109 | "tower-layer", 110 | "tower-service", 111 | "tracing", 112 | ] 113 | 114 | [[package]] 115 | name = "axum-core" 116 | version = "0.4.5" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" 119 | dependencies = [ 120 | "async-trait", 121 | "bytes", 122 | "futures-util", 123 | "http", 124 | "http-body", 125 | "http-body-util", 126 | "mime", 127 | "pin-project-lite", 128 | "rustversion", 129 | "sync_wrapper", 130 | "tower-layer", 131 | "tower-service", 132 | "tracing", 133 | ] 134 | 135 | [[package]] 136 | name = "backtrace" 137 | version = "0.3.68" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" 140 | dependencies = [ 141 | "addr2line", 142 | "cc", 143 | "cfg-if", 144 | "libc", 145 | "miniz_oxide", 146 | "object", 147 | "rustc-demangle", 148 | ] 149 | 150 | [[package]] 151 | name = "base64" 152 | version = "0.22.1" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 155 | 156 | [[package]] 157 | name = "bitflags" 158 | version = "1.3.2" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 161 | 162 | [[package]] 163 | name = "bitflags" 164 | version = "2.6.0" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 167 | 168 | [[package]] 169 | name = "block-buffer" 170 | version = "0.10.4" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 173 | dependencies = [ 174 | "generic-array", 175 | ] 176 | 177 | [[package]] 178 | name = "bumpalo" 179 | version = "3.13.0" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" 182 | 183 | [[package]] 184 | name = "byteorder" 185 | version = "1.4.3" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 188 | 189 | [[package]] 190 | name = "bytes" 191 | version = "1.10.0" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" 194 | 195 | [[package]] 196 | name = "cc" 197 | version = "1.1.30" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" 200 | dependencies = [ 201 | "shlex", 202 | ] 203 | 204 | [[package]] 205 | name = "cfg-if" 206 | version = "1.0.0" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 209 | 210 | [[package]] 211 | name = "cpufeatures" 212 | version = "0.2.9" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" 215 | dependencies = [ 216 | "libc", 217 | ] 218 | 219 | [[package]] 220 | name = "crypto-common" 221 | version = "0.1.6" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 224 | dependencies = [ 225 | "generic-array", 226 | "typenum", 227 | ] 228 | 229 | [[package]] 230 | name = "digest" 231 | version = "0.10.7" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 234 | dependencies = [ 235 | "block-buffer", 236 | "crypto-common", 237 | "subtle", 238 | ] 239 | 240 | [[package]] 241 | name = "either" 242 | version = "1.9.0" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 245 | 246 | [[package]] 247 | name = "equivalent" 248 | version = "1.0.1" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 251 | 252 | [[package]] 253 | name = "errno" 254 | version = "0.3.9" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 257 | dependencies = [ 258 | "libc", 259 | "windows-sys 0.52.0", 260 | ] 261 | 262 | [[package]] 263 | name = "fallible-iterator" 264 | version = "0.2.0" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" 267 | 268 | [[package]] 269 | name = "fastrand" 270 | version = "2.0.0" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" 273 | 274 | [[package]] 275 | name = "fixedbitset" 276 | version = "0.4.2" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 279 | 280 | [[package]] 281 | name = "fnv" 282 | version = "1.0.7" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 285 | 286 | [[package]] 287 | name = "form_urlencoded" 288 | version = "1.2.0" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 291 | dependencies = [ 292 | "percent-encoding", 293 | ] 294 | 295 | [[package]] 296 | name = "frontend-server" 297 | version = "0.1.0" 298 | dependencies = [ 299 | "axum", 300 | "bytes", 301 | "prost", 302 | "tokio", 303 | "tonic", 304 | "tonic-build", 305 | "tower-http", 306 | "tracing", 307 | "tracing-attributes", 308 | "tracing-futures", 309 | "tracing-subscriber", 310 | ] 311 | 312 | [[package]] 313 | name = "futures-channel" 314 | version = "0.3.28" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 317 | dependencies = [ 318 | "futures-core", 319 | "futures-sink", 320 | ] 321 | 322 | [[package]] 323 | name = "futures-core" 324 | version = "0.3.28" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 327 | 328 | [[package]] 329 | name = "futures-macro" 330 | version = "0.3.28" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" 333 | dependencies = [ 334 | "proc-macro2", 335 | "quote", 336 | "syn", 337 | ] 338 | 339 | [[package]] 340 | name = "futures-sink" 341 | version = "0.3.28" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 344 | 345 | [[package]] 346 | name = "futures-task" 347 | version = "0.3.28" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 350 | 351 | [[package]] 352 | name = "futures-util" 353 | version = "0.3.28" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 356 | dependencies = [ 357 | "futures-core", 358 | "futures-macro", 359 | "futures-sink", 360 | "futures-task", 361 | "pin-project-lite", 362 | "pin-utils", 363 | "slab", 364 | ] 365 | 366 | [[package]] 367 | name = "generic-array" 368 | version = "0.14.7" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 371 | dependencies = [ 372 | "typenum", 373 | "version_check", 374 | ] 375 | 376 | [[package]] 377 | name = "getrandom" 378 | version = "0.2.10" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 381 | dependencies = [ 382 | "cfg-if", 383 | "libc", 384 | "wasi 0.11.0+wasi-snapshot-preview1", 385 | ] 386 | 387 | [[package]] 388 | name = "getrandom" 389 | version = "0.3.1" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" 392 | dependencies = [ 393 | "cfg-if", 394 | "libc", 395 | "wasi 0.13.3+wasi-0.2.2", 396 | "windows-targets 0.52.6", 397 | ] 398 | 399 | [[package]] 400 | name = "gimli" 401 | version = "0.27.3" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" 404 | 405 | [[package]] 406 | name = "h2" 407 | version = "0.4.6" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" 410 | dependencies = [ 411 | "atomic-waker", 412 | "bytes", 413 | "fnv", 414 | "futures-core", 415 | "futures-sink", 416 | "http", 417 | "indexmap 2.6.0", 418 | "slab", 419 | "tokio", 420 | "tokio-util", 421 | "tracing", 422 | ] 423 | 424 | [[package]] 425 | name = "hashbrown" 426 | version = "0.12.3" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 429 | 430 | [[package]] 431 | name = "hashbrown" 432 | version = "0.15.0" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" 435 | 436 | [[package]] 437 | name = "heck" 438 | version = "0.4.1" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 441 | 442 | [[package]] 443 | name = "hermit-abi" 444 | version = "0.3.9" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 447 | 448 | [[package]] 449 | name = "hmac" 450 | version = "0.12.1" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 453 | dependencies = [ 454 | "digest", 455 | ] 456 | 457 | [[package]] 458 | name = "http" 459 | version = "1.0.0" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" 462 | dependencies = [ 463 | "bytes", 464 | "fnv", 465 | "itoa", 466 | ] 467 | 468 | [[package]] 469 | name = "http-body" 470 | version = "1.0.0" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" 473 | dependencies = [ 474 | "bytes", 475 | "http", 476 | ] 477 | 478 | [[package]] 479 | name = "http-body-util" 480 | version = "0.1.0" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" 483 | dependencies = [ 484 | "bytes", 485 | "futures-util", 486 | "http", 487 | "http-body", 488 | "pin-project-lite", 489 | ] 490 | 491 | [[package]] 492 | name = "httparse" 493 | version = "1.8.0" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 496 | 497 | [[package]] 498 | name = "httpdate" 499 | version = "1.0.2" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 502 | 503 | [[package]] 504 | name = "hyper" 505 | version = "1.4.1" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" 508 | dependencies = [ 509 | "bytes", 510 | "futures-channel", 511 | "futures-util", 512 | "h2", 513 | "http", 514 | "http-body", 515 | "httparse", 516 | "httpdate", 517 | "itoa", 518 | "pin-project-lite", 519 | "smallvec", 520 | "tokio", 521 | "want", 522 | ] 523 | 524 | [[package]] 525 | name = "hyper-timeout" 526 | version = "0.5.1" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" 529 | dependencies = [ 530 | "hyper", 531 | "hyper-util", 532 | "pin-project-lite", 533 | "tokio", 534 | "tower-service", 535 | ] 536 | 537 | [[package]] 538 | name = "hyper-util" 539 | version = "0.1.9" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" 542 | dependencies = [ 543 | "bytes", 544 | "futures-channel", 545 | "futures-util", 546 | "http", 547 | "http-body", 548 | "hyper", 549 | "pin-project-lite", 550 | "socket2", 551 | "tokio", 552 | "tower-service", 553 | "tracing", 554 | ] 555 | 556 | [[package]] 557 | name = "indexmap" 558 | version = "1.9.3" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 561 | dependencies = [ 562 | "autocfg", 563 | "hashbrown 0.12.3", 564 | ] 565 | 566 | [[package]] 567 | name = "indexmap" 568 | version = "2.6.0" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" 571 | dependencies = [ 572 | "equivalent", 573 | "hashbrown 0.15.0", 574 | ] 575 | 576 | [[package]] 577 | name = "itertools" 578 | version = "0.10.5" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 581 | dependencies = [ 582 | "either", 583 | ] 584 | 585 | [[package]] 586 | name = "itoa" 587 | version = "1.0.9" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" 590 | 591 | [[package]] 592 | name = "js-sys" 593 | version = "0.3.64" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" 596 | dependencies = [ 597 | "wasm-bindgen", 598 | ] 599 | 600 | [[package]] 601 | name = "lazy_static" 602 | version = "1.4.0" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 605 | 606 | [[package]] 607 | name = "libc" 608 | version = "0.2.169" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" 611 | 612 | [[package]] 613 | name = "linux-raw-sys" 614 | version = "0.4.14" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 617 | 618 | [[package]] 619 | name = "lock_api" 620 | version = "0.4.10" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" 623 | dependencies = [ 624 | "autocfg", 625 | "scopeguard", 626 | ] 627 | 628 | [[package]] 629 | name = "log" 630 | version = "0.4.19" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" 633 | 634 | [[package]] 635 | name = "matchers" 636 | version = "0.1.0" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 639 | dependencies = [ 640 | "regex-automata 0.1.10", 641 | ] 642 | 643 | [[package]] 644 | name = "matchit" 645 | version = "0.7.2" 646 | source = "registry+https://github.com/rust-lang/crates.io-index" 647 | checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" 648 | 649 | [[package]] 650 | name = "md-5" 651 | version = "0.10.5" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" 654 | dependencies = [ 655 | "digest", 656 | ] 657 | 658 | [[package]] 659 | name = "memchr" 660 | version = "2.5.0" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 663 | 664 | [[package]] 665 | name = "mime" 666 | version = "0.3.17" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 669 | 670 | [[package]] 671 | name = "miniz_oxide" 672 | version = "0.7.1" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 675 | dependencies = [ 676 | "adler", 677 | ] 678 | 679 | [[package]] 680 | name = "mio" 681 | version = "1.0.2" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" 684 | dependencies = [ 685 | "hermit-abi", 686 | "libc", 687 | "wasi 0.11.0+wasi-snapshot-preview1", 688 | "windows-sys 0.52.0", 689 | ] 690 | 691 | [[package]] 692 | name = "multimap" 693 | version = "0.8.3" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" 696 | 697 | [[package]] 698 | name = "nu-ansi-term" 699 | version = "0.46.0" 700 | source = "registry+https://github.com/rust-lang/crates.io-index" 701 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 702 | dependencies = [ 703 | "overload", 704 | "winapi", 705 | ] 706 | 707 | [[package]] 708 | name = "object" 709 | version = "0.31.1" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" 712 | dependencies = [ 713 | "memchr", 714 | ] 715 | 716 | [[package]] 717 | name = "once_cell" 718 | version = "1.18.0" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 721 | 722 | [[package]] 723 | name = "overload" 724 | version = "0.1.1" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 727 | 728 | [[package]] 729 | name = "parking_lot" 730 | version = "0.12.1" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 733 | dependencies = [ 734 | "lock_api", 735 | "parking_lot_core", 736 | ] 737 | 738 | [[package]] 739 | name = "parking_lot_core" 740 | version = "0.9.8" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" 743 | dependencies = [ 744 | "cfg-if", 745 | "libc", 746 | "redox_syscall", 747 | "smallvec", 748 | "windows-targets 0.48.1", 749 | ] 750 | 751 | [[package]] 752 | name = "percent-encoding" 753 | version = "2.3.0" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 756 | 757 | [[package]] 758 | name = "petgraph" 759 | version = "0.6.3" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" 762 | dependencies = [ 763 | "fixedbitset", 764 | "indexmap 1.9.3", 765 | ] 766 | 767 | [[package]] 768 | name = "phf" 769 | version = "0.11.2" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" 772 | dependencies = [ 773 | "phf_shared", 774 | ] 775 | 776 | [[package]] 777 | name = "phf_shared" 778 | version = "0.11.2" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" 781 | dependencies = [ 782 | "siphasher", 783 | ] 784 | 785 | [[package]] 786 | name = "pin-project" 787 | version = "1.1.3" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" 790 | dependencies = [ 791 | "pin-project-internal", 792 | ] 793 | 794 | [[package]] 795 | name = "pin-project-internal" 796 | version = "1.1.3" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" 799 | dependencies = [ 800 | "proc-macro2", 801 | "quote", 802 | "syn", 803 | ] 804 | 805 | [[package]] 806 | name = "pin-project-lite" 807 | version = "0.2.11" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "2c516611246607d0c04186886dbb3a754368ef82c79e9827a802c6d836dd111c" 810 | 811 | [[package]] 812 | name = "pin-utils" 813 | version = "0.1.0" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 816 | 817 | [[package]] 818 | name = "postgres-protocol" 819 | version = "0.6.8" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "76ff0abab4a9b844b93ef7b81f1efc0a366062aaef2cd702c76256b5dc075c54" 822 | dependencies = [ 823 | "base64", 824 | "byteorder", 825 | "bytes", 826 | "fallible-iterator", 827 | "hmac", 828 | "md-5", 829 | "memchr", 830 | "rand 0.9.0", 831 | "sha2", 832 | "stringprep", 833 | ] 834 | 835 | [[package]] 836 | name = "postgres-types" 837 | version = "0.2.9" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "613283563cd90e1dfc3518d548caee47e0e725455ed619881f5cf21f36de4b48" 840 | dependencies = [ 841 | "bytes", 842 | "fallible-iterator", 843 | "postgres-protocol", 844 | ] 845 | 846 | [[package]] 847 | name = "ppv-lite86" 848 | version = "0.2.17" 849 | source = "registry+https://github.com/rust-lang/crates.io-index" 850 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 851 | 852 | [[package]] 853 | name = "prettyplease" 854 | version = "0.2.12" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" 857 | dependencies = [ 858 | "proc-macro2", 859 | "syn", 860 | ] 861 | 862 | [[package]] 863 | name = "proc-macro2" 864 | version = "1.0.93" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" 867 | dependencies = [ 868 | "unicode-ident", 869 | ] 870 | 871 | [[package]] 872 | name = "prost" 873 | version = "0.13.4" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" 876 | dependencies = [ 877 | "bytes", 878 | "prost-derive", 879 | ] 880 | 881 | [[package]] 882 | name = "prost-build" 883 | version = "0.13.3" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" 886 | dependencies = [ 887 | "bytes", 888 | "heck", 889 | "itertools", 890 | "log", 891 | "multimap", 892 | "once_cell", 893 | "petgraph", 894 | "prettyplease", 895 | "prost", 896 | "prost-types", 897 | "regex", 898 | "syn", 899 | "tempfile", 900 | ] 901 | 902 | [[package]] 903 | name = "prost-derive" 904 | version = "0.13.4" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" 907 | dependencies = [ 908 | "anyhow", 909 | "itertools", 910 | "proc-macro2", 911 | "quote", 912 | "syn", 913 | ] 914 | 915 | [[package]] 916 | name = "prost-types" 917 | version = "0.13.3" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" 920 | dependencies = [ 921 | "prost", 922 | ] 923 | 924 | [[package]] 925 | name = "quotation-server" 926 | version = "0.1.0" 927 | dependencies = [ 928 | "bytes", 929 | "prost", 930 | "tokio", 931 | "tokio-postgres", 932 | "tonic", 933 | "tonic-build", 934 | "tower 0.5.2", 935 | "tower-http", 936 | "tracing", 937 | "tracing-attributes", 938 | "tracing-futures", 939 | "tracing-subscriber", 940 | ] 941 | 942 | [[package]] 943 | name = "quote" 944 | version = "1.0.38" 945 | source = "registry+https://github.com/rust-lang/crates.io-index" 946 | checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" 947 | dependencies = [ 948 | "proc-macro2", 949 | ] 950 | 951 | [[package]] 952 | name = "rand" 953 | version = "0.8.5" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 956 | dependencies = [ 957 | "libc", 958 | "rand_chacha 0.3.1", 959 | "rand_core 0.6.4", 960 | ] 961 | 962 | [[package]] 963 | name = "rand" 964 | version = "0.9.0" 965 | source = "registry+https://github.com/rust-lang/crates.io-index" 966 | checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" 967 | dependencies = [ 968 | "rand_chacha 0.9.0", 969 | "rand_core 0.9.0", 970 | "zerocopy", 971 | ] 972 | 973 | [[package]] 974 | name = "rand_chacha" 975 | version = "0.3.1" 976 | source = "registry+https://github.com/rust-lang/crates.io-index" 977 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 978 | dependencies = [ 979 | "ppv-lite86", 980 | "rand_core 0.6.4", 981 | ] 982 | 983 | [[package]] 984 | name = "rand_chacha" 985 | version = "0.9.0" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 988 | dependencies = [ 989 | "ppv-lite86", 990 | "rand_core 0.9.0", 991 | ] 992 | 993 | [[package]] 994 | name = "rand_core" 995 | version = "0.6.4" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 998 | dependencies = [ 999 | "getrandom 0.2.10", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "rand_core" 1004 | version = "0.9.0" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" 1007 | dependencies = [ 1008 | "getrandom 0.3.1", 1009 | "zerocopy", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "redox_syscall" 1014 | version = "0.3.5" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 1017 | dependencies = [ 1018 | "bitflags 1.3.2", 1019 | ] 1020 | 1021 | [[package]] 1022 | name = "regex" 1023 | version = "1.9.3" 1024 | source = "registry+https://github.com/rust-lang/crates.io-index" 1025 | checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" 1026 | dependencies = [ 1027 | "aho-corasick", 1028 | "memchr", 1029 | "regex-automata 0.3.6", 1030 | "regex-syntax 0.7.4", 1031 | ] 1032 | 1033 | [[package]] 1034 | name = "regex-automata" 1035 | version = "0.1.10" 1036 | source = "registry+https://github.com/rust-lang/crates.io-index" 1037 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 1038 | dependencies = [ 1039 | "regex-syntax 0.6.29", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "regex-automata" 1044 | version = "0.3.6" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" 1047 | dependencies = [ 1048 | "aho-corasick", 1049 | "memchr", 1050 | "regex-syntax 0.7.4", 1051 | ] 1052 | 1053 | [[package]] 1054 | name = "regex-syntax" 1055 | version = "0.6.29" 1056 | source = "registry+https://github.com/rust-lang/crates.io-index" 1057 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 1058 | 1059 | [[package]] 1060 | name = "regex-syntax" 1061 | version = "0.7.4" 1062 | source = "registry+https://github.com/rust-lang/crates.io-index" 1063 | checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" 1064 | 1065 | [[package]] 1066 | name = "ring" 1067 | version = "0.17.8" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" 1070 | dependencies = [ 1071 | "cc", 1072 | "cfg-if", 1073 | "getrandom 0.2.10", 1074 | "libc", 1075 | "spin", 1076 | "untrusted", 1077 | "windows-sys 0.52.0", 1078 | ] 1079 | 1080 | [[package]] 1081 | name = "rustc-demangle" 1082 | version = "0.1.23" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 1085 | 1086 | [[package]] 1087 | name = "rustix" 1088 | version = "0.38.28" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" 1091 | dependencies = [ 1092 | "bitflags 2.6.0", 1093 | "errno", 1094 | "libc", 1095 | "linux-raw-sys", 1096 | "windows-sys 0.52.0", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "rustls" 1101 | version = "0.23.14" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" 1104 | dependencies = [ 1105 | "log", 1106 | "once_cell", 1107 | "ring", 1108 | "rustls-pki-types", 1109 | "rustls-webpki", 1110 | "subtle", 1111 | "zeroize", 1112 | ] 1113 | 1114 | [[package]] 1115 | name = "rustls-pemfile" 1116 | version = "2.2.0" 1117 | source = "registry+https://github.com/rust-lang/crates.io-index" 1118 | checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" 1119 | dependencies = [ 1120 | "rustls-pki-types", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "rustls-pki-types" 1125 | version = "1.10.0" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" 1128 | 1129 | [[package]] 1130 | name = "rustls-webpki" 1131 | version = "0.102.8" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" 1134 | dependencies = [ 1135 | "ring", 1136 | "rustls-pki-types", 1137 | "untrusted", 1138 | ] 1139 | 1140 | [[package]] 1141 | name = "rustversion" 1142 | version = "1.0.14" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" 1145 | 1146 | [[package]] 1147 | name = "ryu" 1148 | version = "1.0.15" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" 1151 | 1152 | [[package]] 1153 | name = "scopeguard" 1154 | version = "1.2.0" 1155 | source = "registry+https://github.com/rust-lang/crates.io-index" 1156 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1157 | 1158 | [[package]] 1159 | name = "serde" 1160 | version = "1.0.183" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" 1163 | 1164 | [[package]] 1165 | name = "serde_json" 1166 | version = "1.0.104" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" 1169 | dependencies = [ 1170 | "itoa", 1171 | "ryu", 1172 | "serde", 1173 | ] 1174 | 1175 | [[package]] 1176 | name = "serde_path_to_error" 1177 | version = "0.1.14" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" 1180 | dependencies = [ 1181 | "itoa", 1182 | "serde", 1183 | ] 1184 | 1185 | [[package]] 1186 | name = "serde_urlencoded" 1187 | version = "0.7.1" 1188 | source = "registry+https://github.com/rust-lang/crates.io-index" 1189 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1190 | dependencies = [ 1191 | "form_urlencoded", 1192 | "itoa", 1193 | "ryu", 1194 | "serde", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "sha2" 1199 | version = "0.10.7" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" 1202 | dependencies = [ 1203 | "cfg-if", 1204 | "cpufeatures", 1205 | "digest", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "sharded-slab" 1210 | version = "0.1.4" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" 1213 | dependencies = [ 1214 | "lazy_static", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "shlex" 1219 | version = "1.3.0" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1222 | 1223 | [[package]] 1224 | name = "siphasher" 1225 | version = "0.3.10" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" 1228 | 1229 | [[package]] 1230 | name = "slab" 1231 | version = "0.4.8" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 1234 | dependencies = [ 1235 | "autocfg", 1236 | ] 1237 | 1238 | [[package]] 1239 | name = "smallvec" 1240 | version = "1.13.2" 1241 | source = "registry+https://github.com/rust-lang/crates.io-index" 1242 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1243 | 1244 | [[package]] 1245 | name = "socket2" 1246 | version = "0.5.5" 1247 | source = "registry+https://github.com/rust-lang/crates.io-index" 1248 | checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 1249 | dependencies = [ 1250 | "libc", 1251 | "windows-sys 0.48.0", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "spin" 1256 | version = "0.9.8" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1259 | 1260 | [[package]] 1261 | name = "stringprep" 1262 | version = "0.1.3" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" 1265 | dependencies = [ 1266 | "unicode-bidi", 1267 | "unicode-normalization", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "subtle" 1272 | version = "2.5.0" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 1275 | 1276 | [[package]] 1277 | name = "syn" 1278 | version = "2.0.98" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" 1281 | dependencies = [ 1282 | "proc-macro2", 1283 | "quote", 1284 | "unicode-ident", 1285 | ] 1286 | 1287 | [[package]] 1288 | name = "sync_wrapper" 1289 | version = "1.0.1" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" 1292 | 1293 | [[package]] 1294 | name = "tempfile" 1295 | version = "3.7.1" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" 1298 | dependencies = [ 1299 | "cfg-if", 1300 | "fastrand", 1301 | "redox_syscall", 1302 | "rustix", 1303 | "windows-sys 0.48.0", 1304 | ] 1305 | 1306 | [[package]] 1307 | name = "thread_local" 1308 | version = "1.1.7" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" 1311 | dependencies = [ 1312 | "cfg-if", 1313 | "once_cell", 1314 | ] 1315 | 1316 | [[package]] 1317 | name = "tinyvec" 1318 | version = "1.6.0" 1319 | source = "registry+https://github.com/rust-lang/crates.io-index" 1320 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1321 | dependencies = [ 1322 | "tinyvec_macros", 1323 | ] 1324 | 1325 | [[package]] 1326 | name = "tinyvec_macros" 1327 | version = "0.1.1" 1328 | source = "registry+https://github.com/rust-lang/crates.io-index" 1329 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1330 | 1331 | [[package]] 1332 | name = "tokio" 1333 | version = "1.43.0" 1334 | source = "registry+https://github.com/rust-lang/crates.io-index" 1335 | checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" 1336 | dependencies = [ 1337 | "backtrace", 1338 | "bytes", 1339 | "libc", 1340 | "mio", 1341 | "pin-project-lite", 1342 | "socket2", 1343 | "tokio-macros", 1344 | "windows-sys 0.52.0", 1345 | ] 1346 | 1347 | [[package]] 1348 | name = "tokio-macros" 1349 | version = "2.5.0" 1350 | source = "registry+https://github.com/rust-lang/crates.io-index" 1351 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 1352 | dependencies = [ 1353 | "proc-macro2", 1354 | "quote", 1355 | "syn", 1356 | ] 1357 | 1358 | [[package]] 1359 | name = "tokio-postgres" 1360 | version = "0.7.13" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "6c95d533c83082bb6490e0189acaa0bbeef9084e60471b696ca6988cd0541fb0" 1363 | dependencies = [ 1364 | "async-trait", 1365 | "byteorder", 1366 | "bytes", 1367 | "fallible-iterator", 1368 | "futures-channel", 1369 | "futures-util", 1370 | "log", 1371 | "parking_lot", 1372 | "percent-encoding", 1373 | "phf", 1374 | "pin-project-lite", 1375 | "postgres-protocol", 1376 | "postgres-types", 1377 | "rand 0.9.0", 1378 | "socket2", 1379 | "tokio", 1380 | "tokio-util", 1381 | "whoami", 1382 | ] 1383 | 1384 | [[package]] 1385 | name = "tokio-rustls" 1386 | version = "0.26.0" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" 1389 | dependencies = [ 1390 | "rustls", 1391 | "rustls-pki-types", 1392 | "tokio", 1393 | ] 1394 | 1395 | [[package]] 1396 | name = "tokio-stream" 1397 | version = "0.1.16" 1398 | source = "registry+https://github.com/rust-lang/crates.io-index" 1399 | checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" 1400 | dependencies = [ 1401 | "futures-core", 1402 | "pin-project-lite", 1403 | "tokio", 1404 | ] 1405 | 1406 | [[package]] 1407 | name = "tokio-util" 1408 | version = "0.7.8" 1409 | source = "registry+https://github.com/rust-lang/crates.io-index" 1410 | checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" 1411 | dependencies = [ 1412 | "bytes", 1413 | "futures-core", 1414 | "futures-sink", 1415 | "pin-project-lite", 1416 | "tokio", 1417 | "tracing", 1418 | ] 1419 | 1420 | [[package]] 1421 | name = "tonic" 1422 | version = "0.12.3" 1423 | source = "registry+https://github.com/rust-lang/crates.io-index" 1424 | checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" 1425 | dependencies = [ 1426 | "async-stream", 1427 | "async-trait", 1428 | "axum", 1429 | "base64", 1430 | "bytes", 1431 | "h2", 1432 | "http", 1433 | "http-body", 1434 | "http-body-util", 1435 | "hyper", 1436 | "hyper-timeout", 1437 | "hyper-util", 1438 | "percent-encoding", 1439 | "pin-project", 1440 | "prost", 1441 | "rustls-pemfile", 1442 | "socket2", 1443 | "tokio", 1444 | "tokio-rustls", 1445 | "tokio-stream", 1446 | "tower 0.4.13", 1447 | "tower-layer", 1448 | "tower-service", 1449 | "tracing", 1450 | ] 1451 | 1452 | [[package]] 1453 | name = "tonic-build" 1454 | version = "0.12.3" 1455 | source = "registry+https://github.com/rust-lang/crates.io-index" 1456 | checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" 1457 | dependencies = [ 1458 | "prettyplease", 1459 | "proc-macro2", 1460 | "prost-build", 1461 | "prost-types", 1462 | "quote", 1463 | "syn", 1464 | ] 1465 | 1466 | [[package]] 1467 | name = "tower" 1468 | version = "0.4.13" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 1471 | dependencies = [ 1472 | "futures-core", 1473 | "futures-util", 1474 | "indexmap 1.9.3", 1475 | "pin-project", 1476 | "pin-project-lite", 1477 | "rand 0.8.5", 1478 | "slab", 1479 | "tokio", 1480 | "tokio-util", 1481 | "tower-layer", 1482 | "tower-service", 1483 | "tracing", 1484 | ] 1485 | 1486 | [[package]] 1487 | name = "tower" 1488 | version = "0.5.2" 1489 | source = "registry+https://github.com/rust-lang/crates.io-index" 1490 | checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 1491 | dependencies = [ 1492 | "futures-core", 1493 | "futures-util", 1494 | "pin-project-lite", 1495 | "sync_wrapper", 1496 | "tokio", 1497 | "tower-layer", 1498 | "tower-service", 1499 | "tracing", 1500 | ] 1501 | 1502 | [[package]] 1503 | name = "tower-http" 1504 | version = "0.6.2" 1505 | source = "registry+https://github.com/rust-lang/crates.io-index" 1506 | checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" 1507 | dependencies = [ 1508 | "bitflags 2.6.0", 1509 | "bytes", 1510 | "http", 1511 | "http-body", 1512 | "pin-project-lite", 1513 | "tower-layer", 1514 | "tower-service", 1515 | "tracing", 1516 | ] 1517 | 1518 | [[package]] 1519 | name = "tower-layer" 1520 | version = "0.3.3" 1521 | source = "registry+https://github.com/rust-lang/crates.io-index" 1522 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 1523 | 1524 | [[package]] 1525 | name = "tower-service" 1526 | version = "0.3.3" 1527 | source = "registry+https://github.com/rust-lang/crates.io-index" 1528 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 1529 | 1530 | [[package]] 1531 | name = "tracing" 1532 | version = "0.1.40" 1533 | source = "registry+https://github.com/rust-lang/crates.io-index" 1534 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 1535 | dependencies = [ 1536 | "log", 1537 | "pin-project-lite", 1538 | "tracing-attributes", 1539 | "tracing-core", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "tracing-attributes" 1544 | version = "0.1.28" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 1547 | dependencies = [ 1548 | "proc-macro2", 1549 | "quote", 1550 | "syn", 1551 | ] 1552 | 1553 | [[package]] 1554 | name = "tracing-core" 1555 | version = "0.1.32" 1556 | source = "registry+https://github.com/rust-lang/crates.io-index" 1557 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 1558 | dependencies = [ 1559 | "once_cell", 1560 | "valuable", 1561 | ] 1562 | 1563 | [[package]] 1564 | name = "tracing-futures" 1565 | version = "0.2.5" 1566 | source = "registry+https://github.com/rust-lang/crates.io-index" 1567 | checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" 1568 | dependencies = [ 1569 | "pin-project", 1570 | "tracing", 1571 | ] 1572 | 1573 | [[package]] 1574 | name = "tracing-log" 1575 | version = "0.2.0" 1576 | source = "registry+https://github.com/rust-lang/crates.io-index" 1577 | checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 1578 | dependencies = [ 1579 | "log", 1580 | "once_cell", 1581 | "tracing-core", 1582 | ] 1583 | 1584 | [[package]] 1585 | name = "tracing-subscriber" 1586 | version = "0.3.18" 1587 | source = "registry+https://github.com/rust-lang/crates.io-index" 1588 | checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" 1589 | dependencies = [ 1590 | "matchers", 1591 | "nu-ansi-term", 1592 | "once_cell", 1593 | "regex", 1594 | "sharded-slab", 1595 | "smallvec", 1596 | "thread_local", 1597 | "tracing", 1598 | "tracing-core", 1599 | "tracing-log", 1600 | ] 1601 | 1602 | [[package]] 1603 | name = "try-lock" 1604 | version = "0.2.4" 1605 | source = "registry+https://github.com/rust-lang/crates.io-index" 1606 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 1607 | 1608 | [[package]] 1609 | name = "typenum" 1610 | version = "1.16.0" 1611 | source = "registry+https://github.com/rust-lang/crates.io-index" 1612 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 1613 | 1614 | [[package]] 1615 | name = "unicode-bidi" 1616 | version = "0.3.13" 1617 | source = "registry+https://github.com/rust-lang/crates.io-index" 1618 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 1619 | 1620 | [[package]] 1621 | name = "unicode-ident" 1622 | version = "1.0.11" 1623 | source = "registry+https://github.com/rust-lang/crates.io-index" 1624 | checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" 1625 | 1626 | [[package]] 1627 | name = "unicode-normalization" 1628 | version = "0.1.22" 1629 | source = "registry+https://github.com/rust-lang/crates.io-index" 1630 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1631 | dependencies = [ 1632 | "tinyvec", 1633 | ] 1634 | 1635 | [[package]] 1636 | name = "untrusted" 1637 | version = "0.9.0" 1638 | source = "registry+https://github.com/rust-lang/crates.io-index" 1639 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 1640 | 1641 | [[package]] 1642 | name = "valuable" 1643 | version = "0.1.0" 1644 | source = "registry+https://github.com/rust-lang/crates.io-index" 1645 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 1646 | 1647 | [[package]] 1648 | name = "version_check" 1649 | version = "0.9.4" 1650 | source = "registry+https://github.com/rust-lang/crates.io-index" 1651 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1652 | 1653 | [[package]] 1654 | name = "want" 1655 | version = "0.3.1" 1656 | source = "registry+https://github.com/rust-lang/crates.io-index" 1657 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 1658 | dependencies = [ 1659 | "try-lock", 1660 | ] 1661 | 1662 | [[package]] 1663 | name = "wasi" 1664 | version = "0.11.0+wasi-snapshot-preview1" 1665 | source = "registry+https://github.com/rust-lang/crates.io-index" 1666 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1667 | 1668 | [[package]] 1669 | name = "wasi" 1670 | version = "0.13.3+wasi-0.2.2" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" 1673 | dependencies = [ 1674 | "wit-bindgen-rt", 1675 | ] 1676 | 1677 | [[package]] 1678 | name = "wasm-bindgen" 1679 | version = "0.2.87" 1680 | source = "registry+https://github.com/rust-lang/crates.io-index" 1681 | checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" 1682 | dependencies = [ 1683 | "cfg-if", 1684 | "wasm-bindgen-macro", 1685 | ] 1686 | 1687 | [[package]] 1688 | name = "wasm-bindgen-backend" 1689 | version = "0.2.87" 1690 | source = "registry+https://github.com/rust-lang/crates.io-index" 1691 | checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" 1692 | dependencies = [ 1693 | "bumpalo", 1694 | "log", 1695 | "once_cell", 1696 | "proc-macro2", 1697 | "quote", 1698 | "syn", 1699 | "wasm-bindgen-shared", 1700 | ] 1701 | 1702 | [[package]] 1703 | name = "wasm-bindgen-macro" 1704 | version = "0.2.87" 1705 | source = "registry+https://github.com/rust-lang/crates.io-index" 1706 | checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" 1707 | dependencies = [ 1708 | "quote", 1709 | "wasm-bindgen-macro-support", 1710 | ] 1711 | 1712 | [[package]] 1713 | name = "wasm-bindgen-macro-support" 1714 | version = "0.2.87" 1715 | source = "registry+https://github.com/rust-lang/crates.io-index" 1716 | checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" 1717 | dependencies = [ 1718 | "proc-macro2", 1719 | "quote", 1720 | "syn", 1721 | "wasm-bindgen-backend", 1722 | "wasm-bindgen-shared", 1723 | ] 1724 | 1725 | [[package]] 1726 | name = "wasm-bindgen-shared" 1727 | version = "0.2.87" 1728 | source = "registry+https://github.com/rust-lang/crates.io-index" 1729 | checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" 1730 | 1731 | [[package]] 1732 | name = "web-sys" 1733 | version = "0.3.64" 1734 | source = "registry+https://github.com/rust-lang/crates.io-index" 1735 | checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" 1736 | dependencies = [ 1737 | "js-sys", 1738 | "wasm-bindgen", 1739 | ] 1740 | 1741 | [[package]] 1742 | name = "whoami" 1743 | version = "1.4.1" 1744 | source = "registry+https://github.com/rust-lang/crates.io-index" 1745 | checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" 1746 | dependencies = [ 1747 | "wasm-bindgen", 1748 | "web-sys", 1749 | ] 1750 | 1751 | [[package]] 1752 | name = "winapi" 1753 | version = "0.3.9" 1754 | source = "registry+https://github.com/rust-lang/crates.io-index" 1755 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1756 | dependencies = [ 1757 | "winapi-i686-pc-windows-gnu", 1758 | "winapi-x86_64-pc-windows-gnu", 1759 | ] 1760 | 1761 | [[package]] 1762 | name = "winapi-i686-pc-windows-gnu" 1763 | version = "0.4.0" 1764 | source = "registry+https://github.com/rust-lang/crates.io-index" 1765 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1766 | 1767 | [[package]] 1768 | name = "winapi-x86_64-pc-windows-gnu" 1769 | version = "0.4.0" 1770 | source = "registry+https://github.com/rust-lang/crates.io-index" 1771 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1772 | 1773 | [[package]] 1774 | name = "windows-sys" 1775 | version = "0.48.0" 1776 | source = "registry+https://github.com/rust-lang/crates.io-index" 1777 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1778 | dependencies = [ 1779 | "windows-targets 0.48.1", 1780 | ] 1781 | 1782 | [[package]] 1783 | name = "windows-sys" 1784 | version = "0.52.0" 1785 | source = "registry+https://github.com/rust-lang/crates.io-index" 1786 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1787 | dependencies = [ 1788 | "windows-targets 0.52.6", 1789 | ] 1790 | 1791 | [[package]] 1792 | name = "windows-targets" 1793 | version = "0.48.1" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" 1796 | dependencies = [ 1797 | "windows_aarch64_gnullvm 0.48.0", 1798 | "windows_aarch64_msvc 0.48.0", 1799 | "windows_i686_gnu 0.48.0", 1800 | "windows_i686_msvc 0.48.0", 1801 | "windows_x86_64_gnu 0.48.0", 1802 | "windows_x86_64_gnullvm 0.48.0", 1803 | "windows_x86_64_msvc 0.48.0", 1804 | ] 1805 | 1806 | [[package]] 1807 | name = "windows-targets" 1808 | version = "0.52.6" 1809 | source = "registry+https://github.com/rust-lang/crates.io-index" 1810 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1811 | dependencies = [ 1812 | "windows_aarch64_gnullvm 0.52.6", 1813 | "windows_aarch64_msvc 0.52.6", 1814 | "windows_i686_gnu 0.52.6", 1815 | "windows_i686_gnullvm", 1816 | "windows_i686_msvc 0.52.6", 1817 | "windows_x86_64_gnu 0.52.6", 1818 | "windows_x86_64_gnullvm 0.52.6", 1819 | "windows_x86_64_msvc 0.52.6", 1820 | ] 1821 | 1822 | [[package]] 1823 | name = "windows_aarch64_gnullvm" 1824 | version = "0.48.0" 1825 | source = "registry+https://github.com/rust-lang/crates.io-index" 1826 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 1827 | 1828 | [[package]] 1829 | name = "windows_aarch64_gnullvm" 1830 | version = "0.52.6" 1831 | source = "registry+https://github.com/rust-lang/crates.io-index" 1832 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1833 | 1834 | [[package]] 1835 | name = "windows_aarch64_msvc" 1836 | version = "0.48.0" 1837 | source = "registry+https://github.com/rust-lang/crates.io-index" 1838 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 1839 | 1840 | [[package]] 1841 | name = "windows_aarch64_msvc" 1842 | version = "0.52.6" 1843 | source = "registry+https://github.com/rust-lang/crates.io-index" 1844 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1845 | 1846 | [[package]] 1847 | name = "windows_i686_gnu" 1848 | version = "0.48.0" 1849 | source = "registry+https://github.com/rust-lang/crates.io-index" 1850 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 1851 | 1852 | [[package]] 1853 | name = "windows_i686_gnu" 1854 | version = "0.52.6" 1855 | source = "registry+https://github.com/rust-lang/crates.io-index" 1856 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1857 | 1858 | [[package]] 1859 | name = "windows_i686_gnullvm" 1860 | version = "0.52.6" 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" 1862 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1863 | 1864 | [[package]] 1865 | name = "windows_i686_msvc" 1866 | version = "0.48.0" 1867 | source = "registry+https://github.com/rust-lang/crates.io-index" 1868 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 1869 | 1870 | [[package]] 1871 | name = "windows_i686_msvc" 1872 | version = "0.52.6" 1873 | source = "registry+https://github.com/rust-lang/crates.io-index" 1874 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1875 | 1876 | [[package]] 1877 | name = "windows_x86_64_gnu" 1878 | version = "0.48.0" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 1881 | 1882 | [[package]] 1883 | name = "windows_x86_64_gnu" 1884 | version = "0.52.6" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1887 | 1888 | [[package]] 1889 | name = "windows_x86_64_gnullvm" 1890 | version = "0.48.0" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 1893 | 1894 | [[package]] 1895 | name = "windows_x86_64_gnullvm" 1896 | version = "0.52.6" 1897 | source = "registry+https://github.com/rust-lang/crates.io-index" 1898 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1899 | 1900 | [[package]] 1901 | name = "windows_x86_64_msvc" 1902 | version = "0.48.0" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 1905 | 1906 | [[package]] 1907 | name = "windows_x86_64_msvc" 1908 | version = "0.52.6" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1911 | 1912 | [[package]] 1913 | name = "wit-bindgen-rt" 1914 | version = "0.33.0" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" 1917 | dependencies = [ 1918 | "bitflags 2.6.0", 1919 | ] 1920 | 1921 | [[package]] 1922 | name = "zerocopy" 1923 | version = "0.8.17" 1924 | source = "registry+https://github.com/rust-lang/crates.io-index" 1925 | checksum = "aa91407dacce3a68c56de03abe2760159582b846c6a4acd2f456618087f12713" 1926 | dependencies = [ 1927 | "zerocopy-derive", 1928 | ] 1929 | 1930 | [[package]] 1931 | name = "zerocopy-derive" 1932 | version = "0.8.17" 1933 | source = "registry+https://github.com/rust-lang/crates.io-index" 1934 | checksum = "06718a168365cad3d5ff0bb133aad346959a2074bd4a85c121255a11304a8626" 1935 | dependencies = [ 1936 | "proc-macro2", 1937 | "quote", 1938 | "syn", 1939 | ] 1940 | 1941 | [[package]] 1942 | name = "zeroize" 1943 | version = "1.8.1" 1944 | source = "registry+https://github.com/rust-lang/crates.io-index" 1945 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 1946 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "frontendservice", 4 | "quotationservice", 5 | ] 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Pradip Caulagi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PHONY: update-proto 2 | update-proto: # Update protobuf definitions for all microservices 3 | cp proto/quotation.proto quotationservice/proto 4 | cp proto/quotation.proto frontendservice/proto 5 | 6 | PHONY: bootstrap 7 | bootstrap: 8 | kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml 9 | kubectl rollout status --timeout 2m -w deployments/ingress-nginx-controller -n ingress-nginx 10 | kubectl create secret generic postgres-password --from-literal=pgpassword=panda 11 | 12 | .PHONY: e2e 13 | e2e: $(SERVICE_IP) 14 | skaffold run 15 | kubectl rollout status --timeout 10m -w deployments/postgres-deployment 16 | kubectl rollout status --timeout 10m -w deployments/quotationservice 17 | kubectl rollout status --timeout 10m -w deployments/frontendservice 18 | kubectl rollout status --timeout 10m -w deployments/ingress-nginx-controller -n ingress-nginx 19 | test 200 = $$(curl -sL -w "%{http_code}\\n" http://localhost -o /dev/null) 20 | 21 | .PHONY: help 22 | help: # Show this help 23 | @{ \ 24 | echo 'Targets:'; \ 25 | echo ''; \ 26 | grep '^[a-z/.-]*: .*# .*' Makefile \ 27 | | sort \ 28 | | sed 's/: \(.*\) # \(.*\)/ - \2 (deps: \1)/' `: fmt targets w/ deps` \ 29 | | sed 's/:.*#/ -/' `: fmt targets w/o deps` \ 30 | | sed 's/^/ /' `: indent`; \ 31 | echo ''; \ 32 | } 1>&2; \ 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rust-k8s-demo 2 | 3 | [![Build & test project](https://github.com/caulagi/rust-k8s-demo/actions/workflows/ci.yml/badge.svg)](https://github.com/caulagi/rust-k8s-demo/actions/workflows/ci.yml) 4 | 5 | ![architecture][architecture] 6 | 7 | This project is an experiment with how modern web applications would look like 8 | when using **Rust** and **Kubernetes**. It is a simple web application that 9 | returns a new quotation for each request. 10 | 11 | There are two isolated microservices. The frontendservice provides one endpoint 12 | that clients (browsers) can connect to. The quotationservice is a [grpc](https://grpc.io/) server, 13 | that answers with a quotation for each request. Both the microservices 14 | use fully asynchronous Rust libraries and are based on [tokio](https://tokio.rs/). 15 | 16 | 17 | ## Features 18 | 19 | - [x] Microservices talking to each other using grpc 20 | - [x] Local dev setup using skaffold 21 | - [x] CI: Build code and run e2e tests for each commit in a k8s cluster 22 | 23 | ## Getting started 24 | 25 | * The repo requires [git-lfs][git-lfs]. 26 | 27 | ```shell 28 | $ git clone https://github.com/caulagi/rust-k8s-demo 29 | 30 | # make sure git lfs files have been cloned; otherwise git lfs pull will get the file 31 | $ ls -lh databaseservice/data 32 | total 15424 33 | -rw-r--r-- 1 pradip.caulagi staff 7.5M Feb 27 15:55 data.sql 34 | ``` 35 | 36 | * Setup a local kubernetes cluster using [kind](https://kind.sigs.k8s.io/). 37 | 38 | ```shell 39 | $ go install sigs.k8s.io/kind@v0.20.0 40 | $ kind create cluster --config kind-config.yaml 41 | ``` 42 | 43 | * Install [skaffold](https://skaffold.dev/) and run the application 44 | 45 | ```shell 46 | $ make bootstrap 47 | $ skaffold run --tail 48 | ``` 49 | 50 | **QED** - Go to [http://localhost](http://localhost). See [setup.md](setup.md) for more options for development setup. 51 | 52 | ## Todo 53 | 54 | - [ ] Service mesh 55 | - [ ] CD 56 | - [ ] Distributed (open) tracing - partially done 57 | - [ ] Prometheus, grafana, alert-manager 58 | - [ ] Cert Manager 59 | - [ ] External DNS(?) 60 | 61 | 62 | ## LICENSE 63 | 64 | This project is licensed under [MIT](LICENSE). 65 | 66 | [architecture]: https://user-images.githubusercontent.com/222507/96347681-a510fe00-10a3-11eb-8ed7-183c460b5def.png 67 | [git-lfs]: https://git-lfs.github.com 68 | -------------------------------------------------------------------------------- /databaseservice/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:15-bookworm 2 | 3 | COPY data /docker-entrypoint-initdb.d 4 | -------------------------------------------------------------------------------- /databaseservice/README.md: -------------------------------------------------------------------------------- 1 | Based on https://github.com/caulagi/postgres-quotation 2 | -------------------------------------------------------------------------------- /databaseservice/data/data.sql: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e6bc8cb2f77e53d305ba9a167a93bde9fc959f31cd0f58bf97bb3bad652f4f4e 3 | size 7896846 4 | -------------------------------------------------------------------------------- /docs/setup.md: -------------------------------------------------------------------------------- 1 | # Local development setup 2 | 3 | #### Setup local postgres database 4 | 5 | ``` 6 | # for fish shell, use (pwd) instead of $(pwd) 7 | $ podman machine init rust-k8s-demo --volume $(pwd):/app 8 | 9 | $ podman machine start rust-k8s-demo 10 | $ podman system connection default rust-k8s-demo 11 | $ podman run \ 12 | -e POSTGRES_PASSWORD=1234 \ 13 | -p 5432:5432 \ 14 | -v /app/databaseservice/data/data.sql:/docker-entrypoint-initdb.d/01-data.sql \ 15 | --name postgres \ 16 | postgres:15-bookworm 17 | ``` 18 | 19 | #### Using docker 20 | 21 | ```shell 22 | $ podman build -t frontend frontendservice 23 | $ podman build -t quotation quotationservice 24 | 25 | # for linux: use localhost instead of docker.for.mac.localhost 26 | $ podman run -it -p 8080:8080 \ 27 | -e QUOTATION_SERVICE_HOSTNAME=host.containers.internal \ 28 | -e RUST_LOG=frontend_server=debug,tower_http=trace \ 29 | --name frontend \ 30 | frontend 31 | $ podman run -it -p 9001:9001 \ 32 | -e POSTGRES_SERVICE=host.containers.internal \ 33 | -e POSTGRES_PASSWORD=1234 \ 34 | -e RUST_LOG=quotation_server=debug,tower_http=trace \ 35 | --name quotation \ 36 | quotation 37 | 38 | # and goto http://localhost:8080 39 | ``` 40 | 41 | #### Local (no docker) 42 | 43 | If you would like to run everything locally, you need the 44 | [rust toolchain](https://rustup.rs/), of course. 45 | 46 | ```shell 47 | $ cargo build 48 | $ RUST_LOG=frontend_server=debug,tower_http=trace QUOTATION_SERVICE_HOSTNAME=localhost cargo run --bin frontend-server 49 | $ RUST_LOG=quotation_server=debug,tower_http=trace POSTGRES_SERVICE=localhost POSTGRES_PASSWORD=1234 cargo run --bin quotation-server 50 | 51 | # and goto http://localhost:8080 52 | ``` 53 | -------------------------------------------------------------------------------- /frontendservice/.dockerignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /frontendservice/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "frontend-server" 3 | version = "0.1.0" 4 | authors = ["Pradip Caulagi "] 5 | edition = "2021" 6 | 7 | [[bin]] 8 | name = "frontend-server" 9 | path = "src/main.rs" 10 | 11 | [dependencies] 12 | axum = "0.7.9" 13 | bytes = "1.10.0" 14 | prost = "0.13.4" 15 | tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"] } 16 | tonic = { version = "0.12.3", features = ["tls"] } 17 | tower-http = { version = "0.6.2", features = ["trace"] } 18 | tracing = "0.1.40" 19 | tracing-subscriber = { version = "0.3.18", features = ["default", "env-filter"]} 20 | tracing-futures = "0.2.5" 21 | tracing-attributes = "0.1.28" 22 | 23 | [build-dependencies] 24 | tonic-build = { version = "0.12.3" } 25 | -------------------------------------------------------------------------------- /frontendservice/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:1.81.0-bookworm as build 2 | 3 | ENV RUST_LOG frontend=info 4 | ENV FORTUNE_SERVICE_HOSTNAME fortuneservice 5 | 6 | COPY . /code 7 | WORKDIR /code 8 | 9 | # https://github.com/hyperium/tonic/issues/965 10 | RUN apt update && apt install -y --no-install-recommends protobuf-compiler 11 | 12 | # required for tonic-build 13 | RUN rustup component add rustfmt 14 | RUN cargo build 15 | 16 | EXPOSE 8080 17 | 18 | FROM debian:bookworm 19 | COPY --from=build /code/target/debug/frontend-server /usr/local/bin/frontend-server 20 | ENTRYPOINT ["/usr/local/bin/frontend-server"] 21 | -------------------------------------------------------------------------------- /frontendservice/README.md: -------------------------------------------------------------------------------- 1 | # Frontend microservice 2 | 3 | The client (browser) facing part of the application that provides 4 | one http endpoint which returns the response from calling quotation microservice. 5 | Run as - 6 | 7 | ```shell 8 | $ QUOTATION_SERVICE_HOSTNAME=localhost RUST_LOG=frontend=debug cargo run 9 | ``` 10 | -------------------------------------------------------------------------------- /frontendservice/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tonic_build::compile_protos("proto/quotation.proto").unwrap(); 3 | } 4 | -------------------------------------------------------------------------------- /frontendservice/proto/quotation.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option java_multiple_files = true; 4 | option java_package = "io.grpc.examples.helloworld"; 5 | option java_outer_classname = "QuotationProto"; 6 | 7 | package quotation; 8 | 9 | // The Quotation service definition. 10 | service Quotation { 11 | // Get a random Quotation 12 | rpc GetRandomQuotation (QuotationRequest) returns (QuotationResponse) {} 13 | } 14 | 15 | // Request to get a random Quotation 16 | message QuotationRequest { 17 | } 18 | 19 | // The response message containing a random Quotation 20 | message QuotationResponse { 21 | string message = 1; 22 | } 23 | -------------------------------------------------------------------------------- /frontendservice/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::{env, error::Error, net::SocketAddr}; 2 | 3 | use axum::{http::StatusCode, response::IntoResponse, routing::get, Router}; 4 | use tower_http::trace::TraceLayer; 5 | use tracing::{debug, error, info}; 6 | use tracing_attributes::instrument; 7 | 8 | pub mod quotation { 9 | // https://github.com/tokio-rs/prost/issues/661 10 | #![allow(clippy::derive_partial_eq_without_eq)] 11 | tonic::include_proto!("quotation"); 12 | } 13 | 14 | use quotation::{quotation_client::QuotationClient, QuotationRequest}; 15 | 16 | async fn get_quotation() -> Result> { 17 | let service_hostname = env::var("QUOTATION_SERVICE_HOSTNAME")?; 18 | let mut client = QuotationClient::connect(format!("http://{service_hostname}:9001")).await?; 19 | let response = client 20 | .get_random_quotation(tonic::Request::new(QuotationRequest {})) 21 | .await?; 22 | Ok(response.into_inner().message) 23 | } 24 | 25 | #[instrument] 26 | async fn handler() -> impl IntoResponse { 27 | match get_quotation().await { 28 | Ok(val) => { 29 | debug!("Received quotation: {:?}", val); 30 | (StatusCode::OK, val) 31 | } 32 | Err(e) => { 33 | error!("{:?}", e); 34 | (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()) 35 | } 36 | } 37 | } 38 | 39 | #[instrument] 40 | #[tokio::main] 41 | async fn main() -> Result<(), Box> { 42 | use tracing_subscriber::EnvFilter; 43 | tracing_subscriber::fmt() 44 | .with_env_filter(EnvFilter::from_default_env().add_directive("async_fn=trace".parse()?)) 45 | .init(); 46 | 47 | let addr = SocketAddr::from(([0, 0, 0, 0], 8080)); 48 | let app = Router::new() 49 | .route("/", get(handler)) 50 | .layer(TraceLayer::new_for_http()); 51 | 52 | info!("Frontend service starting on {:?}", addr); 53 | let listener = tokio::net::TcpListener::bind(&addr).await?; 54 | axum::serve(listener, app).await?; 55 | Ok(()) 56 | } 57 | -------------------------------------------------------------------------------- /kind-config.yaml: -------------------------------------------------------------------------------- 1 | kind: Cluster 2 | apiVersion: kind.x-k8s.io/v1alpha4 3 | nodes: 4 | - role: worker 5 | - role: worker 6 | - role: worker 7 | - role: control-plane 8 | kubeadmConfigPatches: 9 | - | 10 | kind: InitConfiguration 11 | nodeRegistration: 12 | kubeletExtraArgs: 13 | node-labels: "ingress-ready=true" 14 | extraPortMappings: 15 | - containerPort: 80 16 | hostPort: 80 17 | protocol: TCP 18 | - containerPort: 443 19 | hostPort: 443 20 | protocol: TCP 21 | -------------------------------------------------------------------------------- /manifests/databaseservice.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: postgres-deployment 5 | spec: 6 | replicas: 1 7 | selector: 8 | matchLabels: 9 | component: postgres 10 | template: 11 | metadata: 12 | labels: 13 | component: postgres 14 | spec: 15 | containers: 16 | - name: databaseservice 17 | image: databaseservice 18 | ports: 19 | - containerPort: 5432 20 | livenessProbe: 21 | initialDelaySeconds: 180 22 | tcpSocket: 23 | port: 5432 24 | env: 25 | - name: POSTGRES_PASSWORD 26 | valueFrom: 27 | secretKeyRef: 28 | name: postgres-password 29 | key: pgpassword 30 | --- 31 | apiVersion: v1 32 | kind: Service 33 | metadata: 34 | name: postgres-service 35 | spec: 36 | type: ClusterIP 37 | selector: 38 | component: postgres 39 | ports: 40 | - port: 5432 41 | targetPort: 5432 42 | -------------------------------------------------------------------------------- /manifests/frontendservice.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: frontendservice 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: frontendservice 9 | template: 10 | metadata: 11 | labels: 12 | app: frontendservice 13 | spec: 14 | containers: 15 | - name: server 16 | image: frontendservice 17 | ports: 18 | - containerPort: 8080 19 | readinessProbe: 20 | initialDelaySeconds: 10 21 | httpGet: 22 | path: "/" 23 | port: 8080 24 | livenessProbe: 25 | initialDelaySeconds: 10 26 | httpGet: 27 | path: "/" 28 | port: 8080 29 | env: 30 | - name: QUOTATION_SERVICE_HOSTNAME 31 | value: "quotationservice" 32 | - name: RUST_LOG 33 | value: frontend_server=debug,tower_http=trace 34 | resources: 35 | requests: 36 | cpu: 100m 37 | memory: 64Mi 38 | limits: 39 | cpu: 200m 40 | memory: 128Mi 41 | --- 42 | apiVersion: v1 43 | kind: Service 44 | metadata: 45 | name: frontendservice 46 | spec: 47 | type: ClusterIP 48 | selector: 49 | app: frontendservice 50 | ports: 51 | - name: http 52 | port: 80 53 | targetPort: 8080 54 | --- 55 | apiVersion: networking.k8s.io/v1 56 | kind: Ingress 57 | metadata: 58 | name: frontendservice-ingress 59 | annotations: 60 | kubernetes.io/ingress.class: nginx 61 | spec: 62 | rules: 63 | - http: 64 | paths: 65 | - path: / 66 | pathType: Prefix 67 | backend: 68 | service: 69 | name: frontendservice 70 | port: 71 | number: 80 72 | -------------------------------------------------------------------------------- /manifests/quotationservice.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: quotationservice 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: quotationservice 9 | template: 10 | metadata: 11 | labels: 12 | app: quotationservice 13 | spec: 14 | terminationGracePeriodSeconds: 5 15 | containers: 16 | - name: quotationservice 17 | image: quotationservice 18 | ports: 19 | - containerPort: 9001 20 | resources: 21 | requests: 22 | cpu: 200m 23 | memory: 180Mi 24 | limits: 25 | cpu: 300m 26 | memory: 300Mi 27 | env: 28 | - name: RUST_LOG 29 | value: quotation_server=debug,tower_http=trace 30 | - name: POSTGRES_PASSWORD 31 | valueFrom: 32 | secretKeyRef: 33 | name: postgres-password 34 | key: pgpassword 35 | - name: POSTGRES_SERVICE 36 | value: postgres-service 37 | # readinessProbe: 38 | # initialDelaySeconds: 20 39 | # periodSeconds: 15 40 | # exec: 41 | # command: ["/bin/grpc_health_probe", "-addr=:9001"] 42 | # livenessProbe: 43 | # initialDelaySeconds: 20 44 | # periodSeconds: 15 45 | # exec: 46 | # command: ["/bin/grpc_health_probe", "-addr=:9001"] 47 | --- 48 | apiVersion: v1 49 | kind: Service 50 | metadata: 51 | name: quotationservice 52 | spec: 53 | type: ClusterIP 54 | selector: 55 | app: quotationservice 56 | ports: 57 | - name: grpc 58 | port: 9001 59 | targetPort: 9001 60 | -------------------------------------------------------------------------------- /proto/quotation.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option java_multiple_files = true; 4 | option java_package = "io.grpc.examples.helloworld"; 5 | option java_outer_classname = "QuotationProto"; 6 | 7 | package quotation; 8 | 9 | // The Quotation service definition. 10 | service Quotation { 11 | // Get a random Quotation 12 | rpc GetRandomQuotation (QuotationRequest) returns (QuotationResponse) {} 13 | } 14 | 15 | // Request to get a random Quotation 16 | message QuotationRequest { 17 | } 18 | 19 | // The response message containing a random Quotation 20 | message QuotationResponse { 21 | string message = 1; 22 | } 23 | -------------------------------------------------------------------------------- /quotationservice/.dockerignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /quotationservice/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "quotation-server" 3 | version = "0.1.0" 4 | authors = ["Pradip Caulagi "] 5 | edition = "2021" 6 | 7 | license = "MIT" 8 | 9 | [[bin]] 10 | name = "quotation-server" 11 | path = "src/main.rs" 12 | 13 | [dependencies] 14 | bytes = "1.10.0" 15 | prost = "0.13.4" 16 | tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"] } 17 | tokio-postgres = "0.7.13" 18 | tonic = { version = "0.12.3", features = ["tls"] } 19 | tower = "0.5.2" 20 | tower-http = { version = "0.6.2", features = ["trace"] } 21 | tracing = "0.1.40" 22 | tracing-subscriber = { version = "0.3.18", features = ["default", "env-filter"]} 23 | tracing-futures = "0.2.5" 24 | tracing-attributes = "0.1.28" 25 | 26 | [build-dependencies] 27 | tonic-build = { version = "0.12.3" } 28 | -------------------------------------------------------------------------------- /quotationservice/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:1.81.0-bookworm as build 2 | 3 | COPY . /code 4 | WORKDIR /code 5 | 6 | # https://github.com/hyperium/tonic/issues/965 7 | RUN apt update && apt install -y --no-install-recommends protobuf-compiler 8 | 9 | # required for tonic-build 10 | RUN rustup component add rustfmt 11 | RUN cargo build 12 | 13 | # RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \ 14 | # wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ 15 | # chmod +x /bin/grpc_health_probe 16 | EXPOSE 9001 17 | 18 | FROM debian:bookworm 19 | COPY --from=build /code/target/debug/quotation-server /usr/local/bin/quotation-server 20 | ENTRYPOINT ["/usr/local/bin/quotation-server"] 21 | -------------------------------------------------------------------------------- /quotationservice/README.md: -------------------------------------------------------------------------------- 1 | # Fortune service 2 | 3 | A grpc server that gets a random quotation from database and returns 4 | the response. Run as - 5 | 6 | ```shell 7 | $ RUST_LOG=fortune=debug POSTGRES_SERVICE=localhost POSTGRES_PASSWORD=1234 cargo run 8 | ``` 9 | -------------------------------------------------------------------------------- /quotationservice/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tonic_build::compile_protos("proto/quotation.proto").unwrap(); 3 | } 4 | -------------------------------------------------------------------------------- /quotationservice/proto/quotation.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option java_multiple_files = true; 4 | option java_package = "io.grpc.examples.helloworld"; 5 | option java_outer_classname = "QuotationProto"; 6 | 7 | package quotation; 8 | 9 | // The Quotation service definition. 10 | service Quotation { 11 | // Get a random Quotation 12 | rpc GetRandomQuotation (QuotationRequest) returns (QuotationResponse) {} 13 | } 14 | 15 | // Request to get a random Quotation 16 | message QuotationRequest { 17 | } 18 | 19 | // The response message containing a random Quotation 20 | message QuotationResponse { 21 | string message = 1; 22 | } 23 | -------------------------------------------------------------------------------- /quotationservice/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::{env, error::Error}; 2 | 3 | use tokio_postgres::NoTls; 4 | use tonic::{transport::Server, Request, Response, Status}; 5 | use tower::ServiceBuilder; 6 | use tower_http::trace::{DefaultMakeSpan, TraceLayer}; 7 | use tracing::{debug, info}; 8 | 9 | pub mod quotation { 10 | // https://github.com/tokio-rs/prost/issues/661 11 | #![allow(clippy::derive_partial_eq_without_eq)] 12 | tonic::include_proto!("quotation"); 13 | } 14 | 15 | use quotation::{ 16 | quotation_server::{Quotation, QuotationServer}, 17 | QuotationRequest, 18 | QuotationResponse, 19 | }; 20 | 21 | #[derive(Default)] 22 | pub struct MyQuotation {} 23 | 24 | #[tonic::async_trait] 25 | impl Quotation for MyQuotation { 26 | async fn get_random_quotation( 27 | &self, 28 | request: Request, 29 | ) -> Result, Status> { 30 | debug!("REQUEST = {:?}", request); 31 | let connect_params = format!( 32 | "host={} user=postgres password={}", 33 | env::var("POSTGRES_SERVICE").unwrap(), 34 | env::var("POSTGRES_PASSWORD").unwrap() 35 | ); 36 | // Connect to the database. 37 | let (client, connection) = tokio_postgres::connect(connect_params.as_str(), NoTls) 38 | .await 39 | .unwrap(); 40 | 41 | // The connection object performs the actual communication with the database, 42 | // so spawn it off to run on its own. 43 | tokio::spawn(async move { 44 | if let Err(e) = connection.await { 45 | eprintln!("connection error: {e}"); 46 | } 47 | }); 48 | 49 | let rows = client 50 | .query( 51 | "SELECT content, author FROM quotation OFFSET floor(random() * 36937) LIMIT 1;", 52 | &[], 53 | ) 54 | .await 55 | .unwrap(); 56 | 57 | let value: &str = rows[0].get(0); 58 | let response = quotation::QuotationResponse { 59 | message: value.to_string(), 60 | }; 61 | 62 | Ok(Response::new(response)) 63 | } 64 | } 65 | 66 | #[tokio::main] 67 | async fn main() -> Result<(), Box> { 68 | use tracing_subscriber::EnvFilter; 69 | tracing_subscriber::fmt() 70 | .with_env_filter(EnvFilter::from_default_env().add_directive("async_fn=trace".parse()?)) 71 | .init(); 72 | 73 | let addr = "0.0.0.0:9001".parse().unwrap(); 74 | let quotationr = MyQuotation::default(); 75 | 76 | // Build our middleware stack 77 | let layer = ServiceBuilder::new() 78 | // Log all requests and responses 79 | .layer( 80 | TraceLayer::new_for_grpc().make_span_with(DefaultMakeSpan::new().include_headers(true)), 81 | ) 82 | .into_inner(); 83 | 84 | info!("Quotation service starting on {:?}", addr); 85 | Server::builder() 86 | .layer(layer) 87 | .add_service(QuotationServer::new(quotationr)) 88 | .serve(addr) 89 | .await?; 90 | 91 | Ok(()) 92 | } 93 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | edition = "2018" 2 | reorder_imports = true 3 | merge_imports = true 4 | imports_layout = "HorizontalVertical" 5 | -------------------------------------------------------------------------------- /skaffold.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: skaffold/v4beta7 2 | kind: Config 3 | metadata: 4 | name: rust-k-s-demo 5 | build: 6 | artifacts: 7 | - image: databaseservice 8 | context: databaseservice 9 | docker: 10 | dockerfile: Dockerfile 11 | - image: frontendservice 12 | context: frontendservice 13 | docker: 14 | dockerfile: Dockerfile 15 | - image: quotationservice 16 | context: quotationservice 17 | docker: 18 | dockerfile: Dockerfile 19 | manifests: 20 | rawYaml: 21 | - manifests/databaseservice.yaml 22 | - manifests/frontendservice.yaml 23 | - manifests/quotationservice.yaml 24 | --------------------------------------------------------------------------------