diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 77bff5c..0000000 --- a/.drone.yml +++ /dev/null @@ -1,2 +0,0 @@ -kind: template -load: cuddle-rust-cli-plan.yaml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9c4c004..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target/ -.cuddle/ diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 07ae184..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,60 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -## [0.1.0] - 2024-04-06 - -### Added -- update -- update -- update stuff -- update -- with drone -- with agent db -- with sled db and capnp -- with sled db -- with basic changelog -- with basic package -- with publish -- with monitoring -- with monitor -- with extra churning repl thingy -- with enroll -- add initial churn -- add simple health check - -### Docs -- add notes - -### Other -- *(test)* test commit -- *(test)* test commit -- *(test)* test commit -- *(test)* test commit -- Merge pull request 'chore(deps): update all dependencies' (#2) from renovate/all into main - -Reviewed-on: https://git.front.kjuulh.io/kjuulh/churn/pulls/2 - -- *(deps)* update all dependencies -- change to byte slice -- fmt -- fmt -- Add renovate.json - -- Release churn-server v0.1.0 - -- Release churn-agent v0.1.0 - -- Release churn v0.1.0 - -- Release churn v0.1.0 - -- Release churn-domain v0.1.0, churn v0.1.0 - -- with changelog -- Release churn-domain v0.1.0, churn v0.1.0 - diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index bb8c7ea..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2816 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "ascii" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" - -[[package]] -name = "async-trait" -version = "0.1.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "autocfg" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" - -[[package]] -name = "axum" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" -dependencies = [ - "async-trait", - "axum-core", - "axum-macros", - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.2.0", - "hyper-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper 1.0.0", - "tokio", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 0.1.2", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-macros" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - -[[package]] -name = "capnp" -version = "0.19.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de71387912cac7dd3cb7c219e09628411620a18061bba58c71453c26ae7bf66a" -dependencies = [ - "embedded-io", -] - -[[package]] -name = "capnpc" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ba30e0f08582d53c2f3710cf4bb65ff562614b1ba86906d7391adffe189ec" -dependencies = [ - "capnp", -] - -[[package]] -name = "cc" -version = "1.0.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "churn" -version = "0.1.0" -dependencies = [ - "anyhow", - "axum", - "churn-domain", - "clap", - "dotenv", - "reqwest 0.12.7", - "tokio", - "tracing", - "tracing-subscriber", - "uuid", -] - -[[package]] -name = "churn-agent" -version = "0.1.0" -dependencies = [ - "anyhow", - "axum", - "churn-domain", - "clap", - "dotenv", - "reqwest 0.12.7", - "serde", - "serde_json", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "churn-capnp" -version = "0.1.0" -dependencies = [ - "anyhow", - "capnp", - "capnpc", - "chrono", - "churn-domain", - "uuid", -] - -[[package]] -name = "churn-domain" -version = "0.1.0" -dependencies = [ - "anyhow", - "axum", - "chrono", - "clap", - "dotenv", - "reqwest 0.12.7", - "serde", - "tokio", - "tracing", - "tracing-subscriber", - "uuid", -] - -[[package]] -name = "churn-server" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "axum", - "churn-capnp", - "churn-domain", - "clap", - "dotenv", - "itertools", - "serde", - "serde_json", - "sled", - "tokio", - "tracing", - "tracing-subscriber", - "uuid", -] - -[[package]] -name = "churning" -version = "0.1.0" -dependencies = [ - "dagger-rust", - "dagger-sdk 0.11.10", - "eyre", - "tokio", -] - -[[package]] -name = "clap" -version = "4.5.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim 0.11.1", -] - -[[package]] -name = "clap_derive" -version = "4.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "combine" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" -dependencies = [ - "ascii", - "byteorder", - "either", - "memchr", - "unreachable", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "dagger-rust" -version = "0.2.0" -source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components.git#556cb152e842602d34e1e999f019e843f568d2ca" -dependencies = [ - "async-trait", - "dagger-sdk 0.9.8", - "eyre", - "tokio", -] - -[[package]] -name = "dagger-sdk" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79bc59868e62ea1451f158aeb8fbb36c5dd2fb098f31bf408dbd165251674edf" -dependencies = [ - "async-trait", - "base64 0.21.7", - "derive_builder", - "dirs", - "eyre", - "flate2", - "futures", - "graphql_client", - "hex", - "hex-literal", - "platform-info", - "reqwest 0.11.27", - "serde", - "serde_json", - "sha2", - "tar", - "tempfile", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "dagger-sdk" -version = "0.11.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34f5a056235b371e8aabc7a3ccd90632e89316aefd081067cf0e304445e3c1d" -dependencies = [ - "async-trait", - "base64 0.21.7", - "derive_builder", - "dirs", - "eyre", - "flate2", - "futures", - "graphql_client", - "hex", - "hex-literal", - "platform-info", - "reqwest 0.11.27", - "serde", - "serde_graphql_input", - "serde_json", - "sha2", - "tar", - "tempfile", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "embedded-io" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06fddc2749e0528d2813f95e050e87e52c8cbbae56223b9babf73b3e53b0cc6" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "graphql-introspection-query" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2a4732cf5140bd6c082434494f785a19cfb566ab07d1382c3671f5812fed6d" -dependencies = [ - "serde", -] - -[[package]] -name = "graphql-parser" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ebc8013b4426d5b81a4364c419a95ed0b404af2b82e2457de52d9348f0e474" -dependencies = [ - "combine", - "thiserror", -] - -[[package]] -name = "graphql_client" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cdf7b487d864c2939b23902291a5041bc4a84418268f25fda1c8d4e15ad8fa" -dependencies = [ - "graphql_query_derive", - "reqwest 0.11.27", - "serde", - "serde_json", -] - -[[package]] -name = "graphql_client_codegen" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40f793251171991c4eb75bd84bc640afa8b68ff6907bc89d3b712a22f700506" -dependencies = [ - "graphql-introspection-query", - "graphql-parser", - "heck 0.4.1", - "lazy_static", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 1.0.109", -] - -[[package]] -name = "graphql_query_derive" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bda454f3d313f909298f626115092d348bc231025699f557b27e248475f48c" -dependencies = [ - "graphql_client_codegen", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 1.1.0", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" -dependencies = [ - "bytes", - "futures-core", - "http 1.1.0", - "http-body 1.0.0", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.4", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.28", - "rustls 0.21.10", - "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" -dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.2.0", - "hyper-util", - "rustls 0.23.7", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.26.0", - "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.2.0", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.2.0", - "pin-project-lite", - "socket2", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "platform-info" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6259c4860e53bf665016f1b2f46a8859cadfa717581dc9d597ae4069de6300f" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "proc-macro2" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls 0.24.2", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.10", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", - "tokio", - "tokio-rustls 0.24.1", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "reqwest" -version = "0.12.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" -dependencies = [ - "base64 0.22.0", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.4.4", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.2.0", - "hyper-rustls 0.27.2", - "hyper-tls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 2.1.2", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.0", - "system-configuration 0.6.1", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows-registry", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustix" -version = "0.38.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" -dependencies = [ - "once_cell", - "rustls-pki-types", - "rustls-webpki 0.102.3", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.0", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "security-framework" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "serde" -version = "1.0.215" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.215" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "serde_graphql_input" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7b3ed302fb48549bd1b0df59d180655f0eb621d71a3924c68e1af9aed4f6a6a" -dependencies = [ - "anyhow", - "itoa", - "serde", - "tokio", - "tracing", -] - -[[package]] -name = "serde_json" -version = "1.0.126" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b863381a05ffefbc82571a2d893edf47b27fb0ebedbf582c39640e51abebef" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot 0.11.2", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384595c11a4e2969895cad5a8c4029115f5ab956a9e5ef4de79d11a426e5f20c" -dependencies = [ - "futures-core", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys 0.5.0", -] - -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.5.0", - "core-foundation", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "thiserror" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.39.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot 0.12.1", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.10", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls 0.23.7", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "nu-ansi-term", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -dependencies = [ - "void", -] - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.82", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "wasm-streams" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys", - "rustix", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 87ebca6..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[workspace] -members = ["crates/*"] -resolver = "2" - -[workspace.package] -repository = "https://git.front.kjuulh.io/kjuulh/cuddle-please" -description = "Churn is a distributed configuration manager and engine" -readme = "README.md" -license-file = "LICENSE-MIT" -authors = ["kjuulh "] -version = "0.1.0" -edition = "2021" -publish = true - -[workspace.dependencies] -churn = { path = "crates/churn" } -churn-agent = { path = "crates/churn-agent" } -churn-server = { path = "crates/churn-server" } -churn-domain = { path = "crates/churn-domain", version = "0.1.0" } -churn-capnp = { path = "crates/churn-capnp", version = "0.1.0" } - -anyhow = { version = "1.0.86" } -tokio = { version = "1", features = ["full"] } -tracing = { version = "0.1", features = ["log"] } -tracing-subscriber = { version = "0.3.18" } -clap = { version = "4.5.4", features = ["derive", "env"] } -dotenv = { version = "0.15.0" } -axum = { version = "0.7.5", features = ["macros"] } -async-trait = "*" -serde = {version = "1", features = ["derive"]} -serde_json = "1" -reqwest = {version = "0.12.4", features = ["json"]} -uuid = {version = "1.8.0", features = ["v4", "serde"]} -itertools = {version = "0.13.0"} - -sled = "0.34.7" -chrono = {version = "0.4.38", features = ["serde"]} \ No newline at end of file diff --git a/LICENSE-MIT b/LICENSE-MIT deleted file mode 100644 index 0135b42..0000000 --- a/LICENSE-MIT +++ /dev/null @@ -1,8 +0,0 @@ -Copyright 2023 Kasper J. Hermansen - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/NOTES.md b/NOTES.md deleted file mode 100644 index ed724ff..0000000 --- a/NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -# Notes - -- Building a ringbuffer like structure for sliding window logs in the server. - - Move logs to cold storage in rocksdb, after they're expelled from the ringbuffer - -- Implement rocksdb in the agents to support settings and whatnot \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 49a4de7..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Churn - A distributed contriguration manager and engine - -## (Work in progress) diff --git a/crates/churn-agent/CHANGELOG.md b/crates/churn-agent/CHANGELOG.md deleted file mode 100644 index fa49d06..0000000 --- a/crates/churn-agent/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## v0.1.0 (2023-08-26) - -### New Features - - - with basic package - - with publish - - with monitor - - add initial churn - - add simple health check - -### Commit Statistics - - - - - 5 commits contributed to the release over the course of 2 calendar days. - - 5 commits were understood as [conventional](https://www.conventionalcommits.org). - - 0 issues like '(#ID)' were seen in commit messages - -### Commit Details - - - -
view details - - * **Uncategorized** - - With basic package (8f8c5fd) - - With publish (821e14f) - - With monitor (569f527) - - Add initial churn (97978df) - - Add simple health check (f61d0bb) -
- diff --git a/crates/churn-agent/Cargo.toml b/crates/churn-agent/Cargo.toml deleted file mode 100644 index 52657d4..0000000 --- a/crates/churn-agent/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "churn-agent" -description.workspace = true -authors.workspace = true -license-file.workspace = true -version= "0.1.0" -edition.workspace = true -publish.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -churn-domain.workspace = true - -anyhow.workspace = true -tokio.workspace = true -tracing.workspace = true -tracing-subscriber.workspace = true -clap.workspace = true -dotenv.workspace = true -axum.workspace = true -serde.workspace = true -serde_json.workspace = true -reqwest.workspace = true diff --git a/crates/churn-agent/src/agent.rs b/crates/churn-agent/src/agent.rs deleted file mode 100644 index 9f13c5e..0000000 --- a/crates/churn-agent/src/agent.rs +++ /dev/null @@ -1,74 +0,0 @@ -use std::sync::Arc; - -use axum::async_trait; -use churn_domain::ServerEnrollReq; - -use tokio::sync::Mutex; - -#[derive(Clone)] -pub struct AgentService(Arc); - -impl std::ops::Deref for AgentService { - type Target = Arc; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl Default for AgentService { - fn default() -> Self { - Self(Arc::new(DefaultAgentService::default())) - } -} - -#[derive(Default)] -struct DefaultAgentService { - server: Arc>, - leases: Arc>>, -} - -#[async_trait] -pub trait AgentServiceTrait { - async fn enroll(&self, agent_name: &str, server: &str, lease: &str) -> anyhow::Result<()>; -} - -#[async_trait] -impl AgentServiceTrait for DefaultAgentService { - async fn enroll(&self, agent_name: &str, server: &str, lease: &str) -> anyhow::Result<()> { - let mut cur_server = self.server.lock().await; - let mut leases = self.leases.lock().await; - - let client = reqwest::Client::new(); - let req = client - .post(format!("{server}/agent/enroll")) - .json(&ServerEnrollReq { - lease: lease.into(), - agent_name: agent_name.into(), - }) - .build()?; - - let resp = client.execute(req).await?; - if !resp.status().is_success() { - if let Ok(text) = resp.text().await { - anyhow::bail!( - "could not enroll agent: {} at server: {}, error: {}", - agent_name, - server, - text - ) - } - - anyhow::bail!( - "could not enroll agent: {} at server: {}", - agent_name, - server - ) - } - - *cur_server = server.to_string(); - leases.push(lease.to_string()); - - Ok(()) - } -} diff --git a/crates/churn-agent/src/main.rs b/crates/churn-agent/src/main.rs deleted file mode 100644 index f1dcfbc..0000000 --- a/crates/churn-agent/src/main.rs +++ /dev/null @@ -1,130 +0,0 @@ -mod agent; - -use std::net::SocketAddr; - -use agent::AgentService; -use anyhow::Error; -use axum::{ - extract::State, - http::StatusCode, - response::{IntoResponse, Response}, - routing::{get, post}, - Json, Router, -}; -use churn_domain::AgentEnrollReq; -use clap::{Parser, Subcommand}; -use serde_json::json; -use tokio::net::TcpListener; - -#[derive(Parser)] -#[command(author, version, about, long_about = None, subcommand_required = true)] -struct Command { - #[command(subcommand)] - command: Option, -} - -#[derive(Subcommand)] -enum Commands { - Daemon { - #[arg(env = "CHURN_ADDR", long)] - host: SocketAddr, - }, - - Connect { - /// agent name is the hostname which other agents or servers can resolve and connect via. It should be unique - #[arg(env = "CHURN_AGENT_NAME", long)] - agent_name: String, - - #[arg(env = "CHURN_ADDR", long)] - host: SocketAddr, - - #[arg(env = "CHURN_TOKEN", long)] - token: String, - }, -} - -#[derive(Clone, Default)] -struct AppState { - agent: AgentService, -} - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - dotenv::dotenv().ok(); - tracing_subscriber::fmt::init(); - - let cli = Command::parse(); - - handle_command(cli).await?; - - Ok(()) -} - -async fn handle_command(cmd: Command) -> anyhow::Result<()> { - match cmd.command { - Some(Commands::Daemon { host }) => { - tracing::info!("Starting churn server"); - - let app = Router::new() - .route("/enroll", post(enroll)) - .route("/ping", get(ping)) - .with_state(AppState::default()); - - tracing::info!("churn server listening on {}", host); - let listener = TcpListener::bind(&host).await?; - axum::serve(listener, app.into_make_service()) - .await - .unwrap(); - - Ok(()) - } - Some(Commands::Connect { - host: _, - token: _, - agent_name: _, - }) => todo!(), - None => todo!(), - } -} - -enum AppError { - Internal(Error), -} - -impl IntoResponse for AppError { - fn into_response(self) -> Response { - let (status, error_message) = match self { - AppError::Internal(e) => { - tracing::error!("failed with error: {}", e); - - ( - StatusCode::INTERNAL_SERVER_ERROR, - "failed with internal error", - ) - } - }; - - let body = Json(json!({ - "error": error_message, - })); - - (status, body).into_response() - } -} - -async fn ping() -> impl IntoResponse { - "pong!" -} - -async fn enroll( - State(state): State, - Json(req): Json, -) -> Result<(), AppError> { - state - .agent - .enroll(&req.agent_name, &req.server, &req.lease) - .await - .map_err(AppError::Internal)?; - - Ok(()) -} diff --git a/crates/churn-capnp/Cargo.toml b/crates/churn-capnp/Cargo.toml deleted file mode 100644 index 4e40269..0000000 --- a/crates/churn-capnp/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "churn-capnp" -repository.workspace = true -description.workspace = true -readme.workspace = true -license-file.workspace = true -authors.workspace = true -version.workspace = true -edition.workspace = true -publish.workspace = true - -[dependencies] -churn-domain.workspace = true - -uuid.workspace = true -anyhow.workspace = true -chrono.workspace = true - -capnp = "0.19.5" - - -[build-dependencies] -capnpc = "0.19.0" diff --git a/crates/churn-capnp/build.rs b/crates/churn-capnp/build.rs deleted file mode 100644 index 42bedc4..0000000 --- a/crates/churn-capnp/build.rs +++ /dev/null @@ -1,10 +0,0 @@ -extern crate capnpc; - -fn main() { - capnpc::CompilerCommand::new() - .output_path("src/") - .src_prefix("schemas/") - .file("schemas/models.capnp") - .run() - .unwrap(); -} diff --git a/crates/churn-capnp/schemas/models.capnp b/crates/churn-capnp/schemas/models.capnp deleted file mode 100644 index c6fe4cb..0000000 --- a/crates/churn-capnp/schemas/models.capnp +++ /dev/null @@ -1,17 +0,0 @@ -@0xf23adf24ffd8aca4; - -struct LogEvent { - id @0 :Text; - author @1 :Text; - content @2 :Text; - datetime @3 :Int64; -} - -struct Agent { - name @0 :Text; -} - -struct Lease { - id @0 :Text; - lease @1 :Text; -} diff --git a/crates/churn-capnp/src/lib.rs b/crates/churn-capnp/src/lib.rs deleted file mode 100644 index 9459627..0000000 --- a/crates/churn-capnp/src/lib.rs +++ /dev/null @@ -1,105 +0,0 @@ -use capnp::message::{Builder, HeapAllocator}; -use capnp::message::{ReaderOptions, TypedReader}; -use capnp::serialize::{self, BufferSegments}; - -use capnp::traits::Owned; -use churn_domain::{Agent, Lease, LogEvent}; - -mod models_capnp; - -pub trait CapnpPackExt { - type Return; - - fn serialize_capnp(&self) -> Vec; - fn deserialize_capnp(content: &[u8]) -> anyhow::Result; - - fn capnp_to_string(builder: &Builder) -> Vec { - serialize::write_message_to_words(builder) - } - - fn string_to_capnp(mut content: &[u8]) -> TypedReader, S> - where - S: Owned, - { - let log_event = - serialize::read_message_from_flat_slice(&mut content, ReaderOptions::new()).unwrap(); - - log_event.into_typed::() - } -} - -impl CapnpPackExt for LogEvent { - type Return = Self; - - fn serialize_capnp(&self) -> Vec { - let mut builder = Builder::new_default(); - let mut log_event = builder.init_root::(); - log_event.set_id(&self.id.to_string()); - log_event.set_author(&self.author); - log_event.set_content(&self.content); - log_event.set_datetime(self.timestamp.timestamp()); - - Self::capnp_to_string(&builder) - } - - fn deserialize_capnp(content: &[u8]) -> anyhow::Result { - let log_event = Self::string_to_capnp::(content); - let log_event = log_event.get()?; - - Ok(Self { - id: uuid::Uuid::parse_str(log_event.get_id()?.to_str()?)?, - author: log_event.get_author()?.to_string()?, - content: log_event.get_content()?.to_string()?, - timestamp: chrono::DateTime::::from_utc( - chrono::NaiveDateTime::from_timestamp_opt(log_event.get_datetime(), 0).unwrap(), - chrono::Utc, - ), - }) - } -} - -impl CapnpPackExt for Agent { - type Return = Self; - - fn serialize_capnp(&self) -> Vec { - let mut builder = Builder::new_default(); - let mut item = builder.init_root::(); - - item.set_name(&self.name); - - Self::capnp_to_string(&builder) - } - - fn deserialize_capnp(content: &[u8]) -> anyhow::Result { - let item = Self::string_to_capnp::(content); - let item = item.get()?; - - Ok(Self { - name: item.get_name()?.to_string()?, - }) - } -} - -impl CapnpPackExt for Lease { - type Return = Self; - - fn serialize_capnp(&self) -> Vec { - let mut builder = Builder::new_default(); - let mut item = builder.init_root::(); - - item.set_id(&self.id.to_string()); - item.set_lease(&self.lease.to_string()); - - Self::capnp_to_string(&builder) - } - - fn deserialize_capnp(content: &[u8]) -> anyhow::Result { - let item = Self::string_to_capnp::(content); - let item = item.get()?; - - Ok(Self { - id: uuid::Uuid::parse_str(item.get_id()?.to_str()?)?, - lease: uuid::Uuid::parse_str(item.get_lease()?.to_str()?)?, - }) - } -} diff --git a/crates/churn-capnp/src/models_capnp.rs b/crates/churn-capnp/src/models_capnp.rs deleted file mode 100644 index 84dab87..0000000 --- a/crates/churn-capnp/src/models_capnp.rs +++ /dev/null @@ -1,771 +0,0 @@ -// @generated by the capnpc-rust plugin to the Cap'n Proto schema compiler. -// DO NOT EDIT. -// source: models.capnp - - -pub mod log_event { - #[derive(Copy, Clone)] - pub struct Owned(()); - impl ::capnp::introspect::Introspect for Owned { fn introspect() -> ::capnp::introspect::Type { ::capnp::introspect::TypeVariant::Struct(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types, annotation_types: _private::get_annotation_types }).into() } } - impl ::capnp::traits::Owned for Owned { type Reader<'a> = Reader<'a>; type Builder<'a> = Builder<'a>; } - impl ::capnp::traits::OwnedStruct for Owned { type Reader<'a> = Reader<'a>; type Builder<'a> = Builder<'a>; } - impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; } - - pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> } - impl <'a,> ::core::marker::Copy for Reader<'a,> {} - impl <'a,> ::core::clone::Clone for Reader<'a,> { - fn clone(&self) -> Self { *self } - } - - impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> { - const TYPE_ID: u64 = _private::TYPE_ID; - } - impl <'a,> ::core::convert::From<::capnp::private::layout::StructReader<'a>> for Reader<'a,> { - fn from(reader: ::capnp::private::layout::StructReader<'a>) -> Self { - Self { reader, } - } - } - - impl <'a,> ::core::convert::From> for ::capnp::dynamic_value::Reader<'a> { - fn from(reader: Reader<'a,>) -> Self { - Self::Struct(::capnp::dynamic_struct::Reader::new(reader.reader, ::capnp::schema::StructSchema::new(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types::<>, annotation_types: _private::get_annotation_types::<>}))) - } - } - - impl <'a,> ::core::fmt::Debug for Reader<'a,> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::result::Result<(), ::core::fmt::Error> { - core::fmt::Debug::fmt(&::core::convert::Into::<::capnp::dynamic_value::Reader<'_>>::into(*self), f) - } - } - - impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> { - fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [::capnp::Word]>) -> ::capnp::Result { - ::core::result::Result::Ok(reader.get_struct(default)?.into()) - } - } - - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader - } - } - - impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> { - fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) { - self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table)) - } - } - - impl <'a,> Reader<'a,> { - pub fn reborrow(&self) -> Reader<'_,> { - Self { .. *self } - } - - pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { - self.reader.total_size() - } - #[inline] - pub fn get_id(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { - ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None) - } - #[inline] - pub fn has_id(&self) -> bool { - !self.reader.get_pointer_field(0).is_null() - } - #[inline] - pub fn get_author(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { - ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None) - } - #[inline] - pub fn has_author(&self) -> bool { - !self.reader.get_pointer_field(1).is_null() - } - #[inline] - pub fn get_content(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { - ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(2), ::core::option::Option::None) - } - #[inline] - pub fn has_content(&self) -> bool { - !self.reader.get_pointer_field(2).is_null() - } - #[inline] - pub fn get_datetime(self) -> i64 { - self.reader.get_data_field::(0) - } - } - - pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> } - impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> { - const STRUCT_SIZE: ::capnp::private::layout::StructSize = ::capnp::private::layout::StructSize { data: 1, pointers: 3 }; - } - impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> { - const TYPE_ID: u64 = _private::TYPE_ID; - } - impl <'a,> ::core::convert::From<::capnp::private::layout::StructBuilder<'a>> for Builder<'a,> { - fn from(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { - Self { builder, } - } - } - - impl <'a,> ::core::convert::From> for ::capnp::dynamic_value::Builder<'a> { - fn from(builder: Builder<'a,>) -> Self { - Self::Struct(::capnp::dynamic_struct::Builder::new(builder.builder, ::capnp::schema::StructSchema::new(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types::<>, annotation_types: _private::get_annotation_types::<>}))) - } - } - - impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> { - fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) { - self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table)) - } - } - - impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { - builder.init_struct(::STRUCT_SIZE).into() - } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [::capnp::Word]>) -> ::capnp::Result { - ::core::result::Result::Ok(builder.get_struct(::STRUCT_SIZE, default)?.into()) - } - } - - impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { - fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } - } - - impl <'a,> Builder<'a,> { - pub fn into_reader(self) -> Reader<'a,> { - self.builder.into_reader().into() - } - pub fn reborrow(&mut self) -> Builder<'_,> { - Builder { builder: self.builder.reborrow() } - } - pub fn reborrow_as_reader(&self) -> Reader<'_,> { - self.builder.as_reader().into() - } - - pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { - self.builder.as_reader().total_size() - } - #[inline] - pub fn get_id(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { - ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) - } - #[inline] - pub fn set_id(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { - ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false).unwrap() - } - #[inline] - pub fn init_id(self, size: u32) -> ::capnp::text::Builder<'a> { - self.builder.get_pointer_field(0).init_text(size) - } - #[inline] - pub fn has_id(&self) -> bool { - !self.builder.is_pointer_field_null(0) - } - #[inline] - pub fn get_author(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { - ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None) - } - #[inline] - pub fn set_author(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { - ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false).unwrap() - } - #[inline] - pub fn init_author(self, size: u32) -> ::capnp::text::Builder<'a> { - self.builder.get_pointer_field(1).init_text(size) - } - #[inline] - pub fn has_author(&self) -> bool { - !self.builder.is_pointer_field_null(1) - } - #[inline] - pub fn get_content(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { - ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(2), ::core::option::Option::None) - } - #[inline] - pub fn set_content(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { - ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(2), value, false).unwrap() - } - #[inline] - pub fn init_content(self, size: u32) -> ::capnp::text::Builder<'a> { - self.builder.get_pointer_field(2).init_text(size) - } - #[inline] - pub fn has_content(&self) -> bool { - !self.builder.is_pointer_field_null(2) - } - #[inline] - pub fn get_datetime(self) -> i64 { - self.builder.get_data_field::(0) - } - #[inline] - pub fn set_datetime(&mut self, value: i64) { - self.builder.set_data_field::(0, value); - } - } - - pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline } - impl ::capnp::capability::FromTypelessPipeline for Pipeline { - fn new(typeless: ::capnp::any_pointer::Pipeline) -> Self { - Self { _typeless: typeless, } - } - } - impl Pipeline { - } - mod _private { - pub static ENCODED_NODE: [::capnp::Word; 78] = [ - ::capnp::word(0, 0, 0, 0, 5, 0, 6, 0), - ::capnp::word(50, 25, 14, 89, 91, 12, 143, 231), - ::capnp::word(13, 0, 0, 0, 1, 0, 1, 0), - ::capnp::word(164, 172, 216, 255, 36, 223, 58, 242), - ::capnp::word(3, 0, 7, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(21, 0, 0, 0, 178, 0, 0, 0), - ::capnp::word(29, 0, 0, 0, 7, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(25, 0, 0, 0, 231, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(109, 111, 100, 101, 108, 115, 46, 99), - ::capnp::word(97, 112, 110, 112, 58, 76, 111, 103), - ::capnp::word(69, 118, 101, 110, 116, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 1, 0, 1, 0), - ::capnp::word(16, 0, 0, 0, 3, 0, 4, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 1, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(97, 0, 0, 0, 26, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(92, 0, 0, 0, 3, 0, 1, 0), - ::capnp::word(104, 0, 0, 0, 2, 0, 1, 0), - ::capnp::word(1, 0, 0, 0, 1, 0, 0, 0), - ::capnp::word(0, 0, 1, 0, 1, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(101, 0, 0, 0, 58, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(96, 0, 0, 0, 3, 0, 1, 0), - ::capnp::word(108, 0, 0, 0, 2, 0, 1, 0), - ::capnp::word(2, 0, 0, 0, 2, 0, 0, 0), - ::capnp::word(0, 0, 1, 0, 2, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(105, 0, 0, 0, 66, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(100, 0, 0, 0, 3, 0, 1, 0), - ::capnp::word(112, 0, 0, 0, 2, 0, 1, 0), - ::capnp::word(3, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 1, 0, 3, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(109, 0, 0, 0, 74, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(108, 0, 0, 0, 3, 0, 1, 0), - ::capnp::word(120, 0, 0, 0, 2, 0, 1, 0), - ::capnp::word(105, 100, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(97, 117, 116, 104, 111, 114, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(99, 111, 110, 116, 101, 110, 116, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(100, 97, 116, 101, 116, 105, 109, 101), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(5, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(5, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ]; - pub fn get_field_types(index: u16) -> ::capnp::introspect::Type { - match index { - 0 => <::capnp::text::Owned as ::capnp::introspect::Introspect>::introspect(), - 1 => <::capnp::text::Owned as ::capnp::introspect::Introspect>::introspect(), - 2 => <::capnp::text::Owned as ::capnp::introspect::Introspect>::introspect(), - 3 => ::introspect(), - _ => panic!("invalid field index {}", index), - } - } - pub fn get_annotation_types(child_index: Option, index: u32) -> ::capnp::introspect::Type { - panic!("invalid annotation indices ({:?}, {}) ", child_index, index) - } - pub static RAW_SCHEMA: ::capnp::introspect::RawStructSchema = ::capnp::introspect::RawStructSchema { - encoded_node: &ENCODED_NODE, - nonunion_members: NONUNION_MEMBERS, - members_by_discriminant: MEMBERS_BY_DISCRIMINANT, - members_by_name: MEMBERS_BY_NAME, - }; - pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3]; - pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; - pub static MEMBERS_BY_NAME : &[u16] = &[1,2,3,0]; - pub const TYPE_ID: u64 = 0xe78f_0c5b_590e_1932; - } -} - -pub mod agent { - #[derive(Copy, Clone)] - pub struct Owned(()); - impl ::capnp::introspect::Introspect for Owned { fn introspect() -> ::capnp::introspect::Type { ::capnp::introspect::TypeVariant::Struct(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types, annotation_types: _private::get_annotation_types }).into() } } - impl ::capnp::traits::Owned for Owned { type Reader<'a> = Reader<'a>; type Builder<'a> = Builder<'a>; } - impl ::capnp::traits::OwnedStruct for Owned { type Reader<'a> = Reader<'a>; type Builder<'a> = Builder<'a>; } - impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; } - - pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> } - impl <'a,> ::core::marker::Copy for Reader<'a,> {} - impl <'a,> ::core::clone::Clone for Reader<'a,> { - fn clone(&self) -> Self { *self } - } - - impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> { - const TYPE_ID: u64 = _private::TYPE_ID; - } - impl <'a,> ::core::convert::From<::capnp::private::layout::StructReader<'a>> for Reader<'a,> { - fn from(reader: ::capnp::private::layout::StructReader<'a>) -> Self { - Self { reader, } - } - } - - impl <'a,> ::core::convert::From> for ::capnp::dynamic_value::Reader<'a> { - fn from(reader: Reader<'a,>) -> Self { - Self::Struct(::capnp::dynamic_struct::Reader::new(reader.reader, ::capnp::schema::StructSchema::new(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types::<>, annotation_types: _private::get_annotation_types::<>}))) - } - } - - impl <'a,> ::core::fmt::Debug for Reader<'a,> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::result::Result<(), ::core::fmt::Error> { - core::fmt::Debug::fmt(&::core::convert::Into::<::capnp::dynamic_value::Reader<'_>>::into(*self), f) - } - } - - impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> { - fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [::capnp::Word]>) -> ::capnp::Result { - ::core::result::Result::Ok(reader.get_struct(default)?.into()) - } - } - - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader - } - } - - impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> { - fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) { - self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table)) - } - } - - impl <'a,> Reader<'a,> { - pub fn reborrow(&self) -> Reader<'_,> { - Self { .. *self } - } - - pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { - self.reader.total_size() - } - #[inline] - pub fn get_name(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { - ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None) - } - #[inline] - pub fn has_name(&self) -> bool { - !self.reader.get_pointer_field(0).is_null() - } - } - - pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> } - impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> { - const STRUCT_SIZE: ::capnp::private::layout::StructSize = ::capnp::private::layout::StructSize { data: 0, pointers: 1 }; - } - impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> { - const TYPE_ID: u64 = _private::TYPE_ID; - } - impl <'a,> ::core::convert::From<::capnp::private::layout::StructBuilder<'a>> for Builder<'a,> { - fn from(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { - Self { builder, } - } - } - - impl <'a,> ::core::convert::From> for ::capnp::dynamic_value::Builder<'a> { - fn from(builder: Builder<'a,>) -> Self { - Self::Struct(::capnp::dynamic_struct::Builder::new(builder.builder, ::capnp::schema::StructSchema::new(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types::<>, annotation_types: _private::get_annotation_types::<>}))) - } - } - - impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> { - fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) { - self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table)) - } - } - - impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { - builder.init_struct(::STRUCT_SIZE).into() - } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [::capnp::Word]>) -> ::capnp::Result { - ::core::result::Result::Ok(builder.get_struct(::STRUCT_SIZE, default)?.into()) - } - } - - impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { - fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } - } - - impl <'a,> Builder<'a,> { - pub fn into_reader(self) -> Reader<'a,> { - self.builder.into_reader().into() - } - pub fn reborrow(&mut self) -> Builder<'_,> { - Builder { builder: self.builder.reborrow() } - } - pub fn reborrow_as_reader(&self) -> Reader<'_,> { - self.builder.as_reader().into() - } - - pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { - self.builder.as_reader().total_size() - } - #[inline] - pub fn get_name(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { - ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) - } - #[inline] - pub fn set_name(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { - ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false).unwrap() - } - #[inline] - pub fn init_name(self, size: u32) -> ::capnp::text::Builder<'a> { - self.builder.get_pointer_field(0).init_text(size) - } - #[inline] - pub fn has_name(&self) -> bool { - !self.builder.is_pointer_field_null(0) - } - } - - pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline } - impl ::capnp::capability::FromTypelessPipeline for Pipeline { - fn new(typeless: ::capnp::any_pointer::Pipeline) -> Self { - Self { _typeless: typeless, } - } - } - impl Pipeline { - } - mod _private { - pub static ENCODED_NODE: [::capnp::Word; 32] = [ - ::capnp::word(0, 0, 0, 0, 5, 0, 6, 0), - ::capnp::word(160, 129, 44, 52, 151, 203, 164, 244), - ::capnp::word(13, 0, 0, 0, 1, 0, 0, 0), - ::capnp::word(164, 172, 216, 255, 36, 223, 58, 242), - ::capnp::word(1, 0, 7, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(21, 0, 0, 0, 154, 0, 0, 0), - ::capnp::word(29, 0, 0, 0, 7, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(25, 0, 0, 0, 63, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(109, 111, 100, 101, 108, 115, 46, 99), - ::capnp::word(97, 112, 110, 112, 58, 65, 103, 101), - ::capnp::word(110, 116, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 1, 0, 1, 0), - ::capnp::word(4, 0, 0, 0, 3, 0, 4, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 1, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(13, 0, 0, 0, 42, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(8, 0, 0, 0, 3, 0, 1, 0), - ::capnp::word(20, 0, 0, 0, 2, 0, 1, 0), - ::capnp::word(110, 97, 109, 101, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ]; - pub fn get_field_types(index: u16) -> ::capnp::introspect::Type { - match index { - 0 => <::capnp::text::Owned as ::capnp::introspect::Introspect>::introspect(), - _ => panic!("invalid field index {}", index), - } - } - pub fn get_annotation_types(child_index: Option, index: u32) -> ::capnp::introspect::Type { - panic!("invalid annotation indices ({:?}, {}) ", child_index, index) - } - pub static RAW_SCHEMA: ::capnp::introspect::RawStructSchema = ::capnp::introspect::RawStructSchema { - encoded_node: &ENCODED_NODE, - nonunion_members: NONUNION_MEMBERS, - members_by_discriminant: MEMBERS_BY_DISCRIMINANT, - members_by_name: MEMBERS_BY_NAME, - }; - pub static NONUNION_MEMBERS : &[u16] = &[0]; - pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; - pub static MEMBERS_BY_NAME : &[u16] = &[0]; - pub const TYPE_ID: u64 = 0xf4a4_cb97_342c_81a0; - } -} - -pub mod lease { - #[derive(Copy, Clone)] - pub struct Owned(()); - impl ::capnp::introspect::Introspect for Owned { fn introspect() -> ::capnp::introspect::Type { ::capnp::introspect::TypeVariant::Struct(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types, annotation_types: _private::get_annotation_types }).into() } } - impl ::capnp::traits::Owned for Owned { type Reader<'a> = Reader<'a>; type Builder<'a> = Builder<'a>; } - impl ::capnp::traits::OwnedStruct for Owned { type Reader<'a> = Reader<'a>; type Builder<'a> = Builder<'a>; } - impl ::capnp::traits::Pipelined for Owned { type Pipeline = Pipeline; } - - pub struct Reader<'a> { reader: ::capnp::private::layout::StructReader<'a> } - impl <'a,> ::core::marker::Copy for Reader<'a,> {} - impl <'a,> ::core::clone::Clone for Reader<'a,> { - fn clone(&self) -> Self { *self } - } - - impl <'a,> ::capnp::traits::HasTypeId for Reader<'a,> { - const TYPE_ID: u64 = _private::TYPE_ID; - } - impl <'a,> ::core::convert::From<::capnp::private::layout::StructReader<'a>> for Reader<'a,> { - fn from(reader: ::capnp::private::layout::StructReader<'a>) -> Self { - Self { reader, } - } - } - - impl <'a,> ::core::convert::From> for ::capnp::dynamic_value::Reader<'a> { - fn from(reader: Reader<'a,>) -> Self { - Self::Struct(::capnp::dynamic_struct::Reader::new(reader.reader, ::capnp::schema::StructSchema::new(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types::<>, annotation_types: _private::get_annotation_types::<>}))) - } - } - - impl <'a,> ::core::fmt::Debug for Reader<'a,> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::result::Result<(), ::core::fmt::Error> { - core::fmt::Debug::fmt(&::core::convert::Into::<::capnp::dynamic_value::Reader<'_>>::into(*self), f) - } - } - - impl <'a,> ::capnp::traits::FromPointerReader<'a> for Reader<'a,> { - fn get_from_pointer(reader: &::capnp::private::layout::PointerReader<'a>, default: ::core::option::Option<&'a [::capnp::Word]>) -> ::capnp::Result { - ::core::result::Result::Ok(reader.get_struct(default)?.into()) - } - } - - impl <'a,> ::capnp::traits::IntoInternalStructReader<'a> for Reader<'a,> { - fn into_internal_struct_reader(self) -> ::capnp::private::layout::StructReader<'a> { - self.reader - } - } - - impl <'a,> ::capnp::traits::Imbue<'a> for Reader<'a,> { - fn imbue(&mut self, cap_table: &'a ::capnp::private::layout::CapTable) { - self.reader.imbue(::capnp::private::layout::CapTableReader::Plain(cap_table)) - } - } - - impl <'a,> Reader<'a,> { - pub fn reborrow(&self) -> Reader<'_,> { - Self { .. *self } - } - - pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { - self.reader.total_size() - } - #[inline] - pub fn get_id(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { - ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(0), ::core::option::Option::None) - } - #[inline] - pub fn has_id(&self) -> bool { - !self.reader.get_pointer_field(0).is_null() - } - #[inline] - pub fn get_lease(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { - ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(1), ::core::option::Option::None) - } - #[inline] - pub fn has_lease(&self) -> bool { - !self.reader.get_pointer_field(1).is_null() - } - } - - pub struct Builder<'a> { builder: ::capnp::private::layout::StructBuilder<'a> } - impl <'a,> ::capnp::traits::HasStructSize for Builder<'a,> { - const STRUCT_SIZE: ::capnp::private::layout::StructSize = ::capnp::private::layout::StructSize { data: 0, pointers: 2 }; - } - impl <'a,> ::capnp::traits::HasTypeId for Builder<'a,> { - const TYPE_ID: u64 = _private::TYPE_ID; - } - impl <'a,> ::core::convert::From<::capnp::private::layout::StructBuilder<'a>> for Builder<'a,> { - fn from(builder: ::capnp::private::layout::StructBuilder<'a>) -> Self { - Self { builder, } - } - } - - impl <'a,> ::core::convert::From> for ::capnp::dynamic_value::Builder<'a> { - fn from(builder: Builder<'a,>) -> Self { - Self::Struct(::capnp::dynamic_struct::Builder::new(builder.builder, ::capnp::schema::StructSchema::new(::capnp::introspect::RawBrandedStructSchema { generic: &_private::RAW_SCHEMA, field_types: _private::get_field_types::<>, annotation_types: _private::get_annotation_types::<>}))) - } - } - - impl <'a,> ::capnp::traits::ImbueMut<'a> for Builder<'a,> { - fn imbue_mut(&mut self, cap_table: &'a mut ::capnp::private::layout::CapTable) { - self.builder.imbue(::capnp::private::layout::CapTableBuilder::Plain(cap_table)) - } - } - - impl <'a,> ::capnp::traits::FromPointerBuilder<'a> for Builder<'a,> { - fn init_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, _size: u32) -> Self { - builder.init_struct(::STRUCT_SIZE).into() - } - fn get_from_pointer(builder: ::capnp::private::layout::PointerBuilder<'a>, default: ::core::option::Option<&'a [::capnp::Word]>) -> ::capnp::Result { - ::core::result::Result::Ok(builder.get_struct(::STRUCT_SIZE, default)?.into()) - } - } - - impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { - fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } - } - - impl <'a,> Builder<'a,> { - pub fn into_reader(self) -> Reader<'a,> { - self.builder.into_reader().into() - } - pub fn reborrow(&mut self) -> Builder<'_,> { - Builder { builder: self.builder.reborrow() } - } - pub fn reborrow_as_reader(&self) -> Reader<'_,> { - self.builder.as_reader().into() - } - - pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { - self.builder.as_reader().total_size() - } - #[inline] - pub fn get_id(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { - ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) - } - #[inline] - pub fn set_id(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { - ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false).unwrap() - } - #[inline] - pub fn init_id(self, size: u32) -> ::capnp::text::Builder<'a> { - self.builder.get_pointer_field(0).init_text(size) - } - #[inline] - pub fn has_id(&self) -> bool { - !self.builder.is_pointer_field_null(0) - } - #[inline] - pub fn get_lease(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { - ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None) - } - #[inline] - pub fn set_lease(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { - ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false).unwrap() - } - #[inline] - pub fn init_lease(self, size: u32) -> ::capnp::text::Builder<'a> { - self.builder.get_pointer_field(1).init_text(size) - } - #[inline] - pub fn has_lease(&self) -> bool { - !self.builder.is_pointer_field_null(1) - } - } - - pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline } - impl ::capnp::capability::FromTypelessPipeline for Pipeline { - fn new(typeless: ::capnp::any_pointer::Pipeline) -> Self { - Self { _typeless: typeless, } - } - } - impl Pipeline { - } - mod _private { - pub static ENCODED_NODE: [::capnp::Word; 47] = [ - ::capnp::word(0, 0, 0, 0, 5, 0, 6, 0), - ::capnp::word(98, 86, 14, 197, 84, 8, 214, 176), - ::capnp::word(13, 0, 0, 0, 1, 0, 0, 0), - ::capnp::word(164, 172, 216, 255, 36, 223, 58, 242), - ::capnp::word(2, 0, 7, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(21, 0, 0, 0, 154, 0, 0, 0), - ::capnp::word(29, 0, 0, 0, 7, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(25, 0, 0, 0, 119, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(109, 111, 100, 101, 108, 115, 46, 99), - ::capnp::word(97, 112, 110, 112, 58, 76, 101, 97), - ::capnp::word(115, 101, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 1, 0, 1, 0), - ::capnp::word(8, 0, 0, 0, 3, 0, 4, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 1, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(41, 0, 0, 0, 26, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(36, 0, 0, 0, 3, 0, 1, 0), - ::capnp::word(48, 0, 0, 0, 2, 0, 1, 0), - ::capnp::word(1, 0, 0, 0, 1, 0, 0, 0), - ::capnp::word(0, 0, 1, 0, 1, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(45, 0, 0, 0, 50, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(40, 0, 0, 0, 3, 0, 1, 0), - ::capnp::word(52, 0, 0, 0, 2, 0, 1, 0), - ::capnp::word(105, 100, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(108, 101, 97, 115, 101, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(12, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ::capnp::word(0, 0, 0, 0, 0, 0, 0, 0), - ]; - pub fn get_field_types(index: u16) -> ::capnp::introspect::Type { - match index { - 0 => <::capnp::text::Owned as ::capnp::introspect::Introspect>::introspect(), - 1 => <::capnp::text::Owned as ::capnp::introspect::Introspect>::introspect(), - _ => panic!("invalid field index {}", index), - } - } - pub fn get_annotation_types(child_index: Option, index: u32) -> ::capnp::introspect::Type { - panic!("invalid annotation indices ({:?}, {}) ", child_index, index) - } - pub static RAW_SCHEMA: ::capnp::introspect::RawStructSchema = ::capnp::introspect::RawStructSchema { - encoded_node: &ENCODED_NODE, - nonunion_members: NONUNION_MEMBERS, - members_by_discriminant: MEMBERS_BY_DISCRIMINANT, - members_by_name: MEMBERS_BY_NAME, - }; - pub static NONUNION_MEMBERS : &[u16] = &[0,1]; - pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; - pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; - pub const TYPE_ID: u64 = 0xb0d6_0854_c50e_5662; - } -} diff --git a/crates/churn-domain/CHANGELOG.md b/crates/churn-domain/CHANGELOG.md deleted file mode 100644 index 2c915da..0000000 --- a/crates/churn-domain/CHANGELOG.md +++ /dev/null @@ -1,43 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## v0.1.0 (2023-08-26) - -### Chore - - - with changelog - -### New Features - - - with basic package - - with publish - - with monitoring - - with monitor - -### Commit Statistics - - - - - 6 commits contributed to the release. - - 5 commits were understood as [conventional](https://www.conventionalcommits.org). - - 0 issues like '(#ID)' were seen in commit messages - -### Commit Details - - - -
view details - - * **Uncategorized** - - With changelog (1ae70ac) - - Release churn-domain v0.1.0, churn v0.1.0 (34bc81e) - - With basic package (8f8c5fd) - - With publish (821e14f) - - With monitoring (e0545c7) - - With monitor (569f527) -
- diff --git a/crates/churn-domain/Cargo.toml b/crates/churn-domain/Cargo.toml deleted file mode 100644 index ccbfd0b..0000000 --- a/crates/churn-domain/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "churn-domain" -description.workspace = true -authors.workspace = true -license-file.workspace = true -version= "0.1.0" -edition.workspace = true -publish.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -anyhow.workspace = true -tokio.workspace = true -tracing.workspace = true -tracing-subscriber.workspace = true -clap.workspace = true -dotenv.workspace = true -axum.workspace = true -reqwest.workspace = true -serde.workspace = true -uuid.workspace = true -chrono.workspace = true diff --git a/crates/churn-domain/src/lib.rs b/crates/churn-domain/src/lib.rs deleted file mode 100644 index 2934c03..0000000 --- a/crates/churn-domain/src/lib.rs +++ /dev/null @@ -1,55 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct LeaseResp { - pub token: String, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct AgentEnrollReq { - pub lease: String, - pub server: String, - pub agent_name: String, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct ServerEnrollReq { - pub lease: String, - pub agent_name: String, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct ServerMonitorResp { - pub cursor: Option, - pub logs: Vec, -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct LogEvent { - pub id: uuid::Uuid, - pub author: String, - pub content: String, - pub timestamp: chrono::DateTime, -} - -impl LogEvent { - pub fn new(author: impl Into, content: impl Into) -> Self { - Self { - id: uuid::Uuid::new_v4(), - author: author.into(), - content: content.into(), - timestamp: chrono::Utc::now(), - } - } -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct Agent { - pub name: String, -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct Lease { - pub id: uuid::Uuid, - pub lease: uuid::Uuid, -} diff --git a/crates/churn-server/CHANGELOG.md b/crates/churn-server/CHANGELOG.md deleted file mode 100644 index f365573..0000000 --- a/crates/churn-server/CHANGELOG.md +++ /dev/null @@ -1,44 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## v0.1.0 (2023-08-26) - -### New Features - - - with basic package - - with publish - - with monitoring - - with monitor - - with enroll - - add initial churn - - add simple health check - -### Commit Statistics - - - - - 8 commits contributed to the release over the course of 2 calendar days. - - 7 commits were understood as [conventional](https://www.conventionalcommits.org). - - 0 issues like '(#ID)' were seen in commit messages - -### Commit Details - - - -
view details - - * **Uncategorized** - - Release churn-domain v0.1.0, churn v0.1.0 (34bc81e) - - With basic package (8f8c5fd) - - With publish (821e14f) - - With monitoring (e0545c7) - - With monitor (569f527) - - With enroll (8c41e10) - - Add initial churn (97978df) - - Add simple health check (f61d0bb) -
- diff --git a/crates/churn-server/Cargo.toml b/crates/churn-server/Cargo.toml deleted file mode 100644 index f62cf16..0000000 --- a/crates/churn-server/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "churn-server" -authors.workspace = true -description.workspace = true -license-file.workspace = true -version= "0.1.0" -edition.workspace = true -publish.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -churn-domain.workspace = true -churn-capnp.workspace = true - -anyhow.workspace = true -tokio.workspace = true -tracing.workspace = true -tracing-subscriber.workspace = true -clap.workspace = true -dotenv.workspace = true -axum.workspace = true -serde.workspace = true -serde_json.workspace = true -uuid.workspace = true -async-trait.workspace = true -itertools.workspace = true - -sled.workspace = true diff --git a/crates/churn-server/src/agent.rs b/crates/churn-server/src/agent.rs deleted file mode 100644 index 5d47be9..0000000 --- a/crates/churn-server/src/agent.rs +++ /dev/null @@ -1,60 +0,0 @@ -use std::sync::Arc; - -use axum::async_trait; - -use churn_capnp::CapnpPackExt; -use churn_domain::{Agent, ServerEnrollReq}; - -use crate::db::Db; - -#[derive(Clone)] -pub struct AgentService(Arc); - -impl AgentService { - pub fn new(db: Db) -> Self { - Self(Arc::new(DefaultAgentService::new(db))) - } -} - -impl std::ops::Deref for AgentService { - type Target = Arc; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -struct DefaultAgentService { - agents: Db, -} - -impl DefaultAgentService { - pub fn new(db: Db) -> Self { - Self { agents: db } - } -} - -#[async_trait] -pub trait AgentServiceTrait { - async fn enroll(&self, req: ServerEnrollReq) -> anyhow::Result; -} - -#[async_trait] -impl AgentServiceTrait for DefaultAgentService { - async fn enroll(&self, req: ServerEnrollReq) -> anyhow::Result { - let agent_name = req.agent_name; - - self.agents - .insert( - "agents", - &agent_name, - &Agent { - name: agent_name.clone(), - } - .serialize_capnp(), - ) - .await?; - - Ok(agent_name) - } -} diff --git a/crates/churn-server/src/db.rs b/crates/churn-server/src/db.rs deleted file mode 100644 index c0bbf4b..0000000 --- a/crates/churn-server/src/db.rs +++ /dev/null @@ -1,64 +0,0 @@ -use core::slice::SlicePattern; - -use std::path::{Path}; -use std::sync::Arc; - -use async_trait::async_trait; - -#[derive(Clone)] -pub struct Db(Arc); - -impl Db { - pub fn new_sled(path: &Path) -> Self { - Self(Arc::new(DefaultDb::new(path))) - } -} - -impl std::ops::Deref for Db { - type Target = Arc; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -struct DefaultDb { - db: sled::Db, -} - -impl DefaultDb { - pub fn new(path: &Path) -> Self { - Self { - db: sled::open(path).expect("to be able open a sled path"), - } - } -} - -#[async_trait] -pub trait DbTrait { - async fn insert(&self, namespace: &str, key: &str, value: &[u8]) -> anyhow::Result<()>; - async fn get_all(&self, namespace: &str) -> anyhow::Result>>; -} - -#[async_trait] -impl DbTrait for DefaultDb { - async fn insert(&self, namespace: &str, key: &str, value: &[u8]) -> anyhow::Result<()> { - let tree = self.db.open_tree(namespace)?; - - tree.insert(key, value)?; - - //tree.flush_async().await?; - - Ok(()) - } - - async fn get_all(&self, namespace: &str) -> anyhow::Result>> { - let tree = self.db.open_tree(namespace)?; - - Ok(tree - .iter() - .flatten() - .map(|(_, val)| val.as_slice().to_vec()) - .collect::>()) - } -} diff --git a/crates/churn-server/src/event.rs b/crates/churn-server/src/event.rs deleted file mode 100644 index 9ee7f0a..0000000 --- a/crates/churn-server/src/event.rs +++ /dev/null @@ -1,108 +0,0 @@ -use std::sync::Arc; - -use axum::async_trait; - -use churn_domain::LogEvent; -use itertools::Itertools; - -use churn_capnp::CapnpPackExt; - -use crate::db::Db; - -#[derive(Clone)] -pub struct EventService(Arc); - -impl EventService { - pub fn new(db: Db) -> Self { - Self(Arc::new(DefaultEventService::new(db))) - } -} - -impl std::ops::Deref for EventService { - type Target = Arc; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -struct DefaultEventService { - db: Db, -} - -impl DefaultEventService { - pub fn new(db: Db) -> Self { - Self { db } - } -} - -#[async_trait] -pub trait EventServiceTrait { - async fn append(&self, req: LogEvent) -> anyhow::Result<()>; - async fn get_from_cursor(&self, cursor: uuid::Uuid) -> anyhow::Result>; - async fn get_from_beginning(&self) -> anyhow::Result>; - async fn get_latest_cursor(&self) -> anyhow::Result; -} - -#[async_trait] -impl EventServiceTrait for DefaultEventService { - async fn append(&self, req: LogEvent) -> anyhow::Result<()> { - self.db - .insert("events_log", &req.id.to_string(), &req.serialize_capnp()) - .await?; - - Ok(()) - } - async fn get_from_cursor(&self, cursor: uuid::Uuid) -> anyhow::Result> { - let events = self.db.get_all("events_log").await?; - - let events = events - .iter() - .flat_map(|e| match LogEvent::deserialize_capnp(e) { - Ok(o) => Ok(o), - Err(e) => { - tracing::error!("failed to deserialize capnp: {e}"); - Err(e) - } - }) - .sorted_by_key(|i| i.timestamp) - .skip_while(|item| item.id != cursor) - .skip(1) - .collect(); - - Ok(events) - } - async fn get_from_beginning(&self) -> anyhow::Result> { - let events = self.db.get_all("events_log").await?; - - let events = events - .iter() - .map(|x| x.as_slice()) - .flat_map(LogEvent::deserialize_capnp) - .sorted_by_key(|i| i.timestamp) - .collect(); - - Ok(events) - } - - async fn get_latest_cursor(&self) -> anyhow::Result { - let events = self.db.get_all("events_log").await?; - - let event = events - .iter() - .flat_map(|e| match LogEvent::deserialize_capnp(e) { - Ok(o) => Ok(o), - Err(e) => { - tracing::error!("failed to deserialize capnp: {e}"); - Err(e) - } - }) - .sorted_by_key(|i| i.timestamp) - .last(); - - match event { - Some(x) => Ok(x.id), - None => anyhow::bail!("no events found"), - } - } -} diff --git a/crates/churn-server/src/lease.rs b/crates/churn-server/src/lease.rs deleted file mode 100644 index a860106..0000000 --- a/crates/churn-server/src/lease.rs +++ /dev/null @@ -1,59 +0,0 @@ -use std::sync::Arc; - -use axum::async_trait; - -use churn_capnp::CapnpPackExt; -use churn_domain::Lease; - - -use crate::db::Db; - -#[derive(Clone)] -pub struct LeaseService(Arc); - -impl LeaseService { - pub fn new(db: Db) -> Self { - Self(Arc::new(DefaultLeaseService::new(db))) - } -} - -impl std::ops::Deref for LeaseService { - type Target = Arc; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -struct DefaultLeaseService { - db: Db, -} - -impl DefaultLeaseService { - pub fn new(db: Db) -> Self { - Self { db } - } -} - -#[async_trait] -pub trait LeaseServiceTrait { - async fn create_lease(&self) -> anyhow::Result; -} - -#[async_trait] -impl LeaseServiceTrait for DefaultLeaseService { - async fn create_lease(&self) -> anyhow::Result { - let lease = uuid::Uuid::new_v4(); - let id = uuid::Uuid::new_v4(); - - self.db - .insert( - "lease", - &lease.to_string(), - &Lease { id, lease }.serialize_capnp(), - ) - .await?; - - Ok(lease.to_string()) - } -} diff --git a/crates/churn-server/src/main.rs b/crates/churn-server/src/main.rs deleted file mode 100644 index a544fca..0000000 --- a/crates/churn-server/src/main.rs +++ /dev/null @@ -1,238 +0,0 @@ -#![feature(slice_pattern)] - -mod agent; -mod db; -mod event; -mod lease; - -use std::net::SocketAddr; -use std::path::PathBuf; - -use agent::AgentService; -use anyhow::Error; -use axum::extract::{Query, State}; -use axum::http::StatusCode; -use axum::response::{IntoResponse, Response}; -use axum::routing::{get, post}; -use axum::{Json, Router}; -use churn_domain::{Agent, LeaseResp, LogEvent, ServerEnrollReq, ServerMonitorResp}; -use clap::{Args, Parser, Subcommand, ValueEnum}; -use event::EventService; -use lease::LeaseService; -use serde::Deserialize; -use serde_json::json; -use tokio::net::TcpListener; - -use crate::db::Db; - -#[derive(Parser)] -#[command(author, version, about, long_about = None, subcommand_required = true)] -struct Command { - #[command(subcommand)] - command: Option, - - #[clap(flatten)] - global: GlobalArgs, -} - -#[derive(Args)] -struct GlobalArgs { - #[arg(env = "CHURN_DATABASE", long, default_value = "sled")] - database: DatabaseType, - - #[arg(env = "CHURN_SLED_PATH", long, default_value = "churn-server.sled")] - sled_path: PathBuf, -} - -#[derive(ValueEnum, Clone)] -enum DatabaseType { - Sled, -} - -#[derive(Subcommand)] -enum Commands { - Serve { - #[arg(env = "SERVICE_HOST", long, default_value = "127.0.0.1:3000")] - host: SocketAddr, - }, -} - -#[derive(Clone)] -struct AppState { - agent: AgentService, - leases: LeaseService, - events: EventService, -} - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - dotenv::dotenv().ok(); - tracing_subscriber::fmt::init(); - - let cli = Command::parse(); - - if let Some(Commands::Serve { host }) = cli.command { - tracing::info!("Starting churn server"); - let db = match cli.global.database { - DatabaseType::Sled => Db::new_sled(&cli.global.sled_path), - }; - - let app = Router::new() - .route("/ping", get(ping)) - .route("/logs", get(logs)) - .nest( - "/agent", - Router::new() - .route("/enroll", post(enroll)) - .route("/ping", post(agent_ping)) - .route("/events", post(get_tasks)) - .route("/lease", post(agent_lease)), - ) - .with_state(AppState { - agent: AgentService::new(db.clone()), - leases: LeaseService::new(db.clone()), - events: EventService::new(db.clone()), - }); - - tracing::info!("churn server listening on {}", host); - let listener = TcpListener::bind(&host).await?; - axum::serve(listener, app.into_make_service()) - .await - .unwrap(); - } - - Ok(()) -} - -enum AppError { - Internal(Error), -} - -impl IntoResponse for AppError { - fn into_response(self) -> Response { - let (status, error_message) = match self { - AppError::Internal(e) => { - tracing::error!("failed with error: {}", e); - - ( - StatusCode::INTERNAL_SERVER_ERROR, - "failed with internal error", - ) - } - }; - - let body = Json(json!({ - "error": error_message, - })); - - (status, body).into_response() - } -} - -async fn enroll( - State(state): State, - Json(req): Json, -) -> Result, AppError> { - state - .events - .append(LogEvent::new(&req.agent_name, "attempting to enroll agent")) - .await - .map_err(AppError::Internal)?; - - let name = state.agent.enroll(req).await.map_err(AppError::Internal)?; - - state - .events - .append(LogEvent::new(&name, "enrolled agent")) - .await - .map_err(AppError::Internal)?; - - Ok(Json(Agent { name })) -} - -async fn agent_lease(State(state): State) -> Result, AppError> { - let lease = state - .leases - .create_lease() - .await - .map_err(AppError::Internal)?; - - Ok(Json(LeaseResp { token: lease })) -} - -async fn agent_ping() -> impl IntoResponse { - todo!() -} - -async fn get_tasks() -> impl IntoResponse { - todo!() -} - -async fn ping() -> impl IntoResponse { - "pong!" -} - -#[derive(Clone, Deserialize)] -struct LogsQuery { - cursor: Option, -} - -async fn logs( - State(state): State, - Query(cursor): Query, -) -> Result, AppError> { - state - .events - .append(LogEvent::new( - "author", - format!( - "logs called: {}", - cursor - .cursor - .as_ref() - .map(|c| format!("(cursor={c})")) - .unwrap_or("".to_string()) - ), - )) - .await - .map_err(AppError::Internal)?; - - match cursor.cursor { - Some(cursor) => { - tracing::debug!("finding logs from cursor: {}", cursor); - } - None => { - tracing::debug!("finding logs from beginning"); - } - } - - match cursor.cursor { - Some(c) => { - let events = state - .events - .get_from_cursor(c) - .await - .map_err(AppError::Internal)?; - - Ok(Json(ServerMonitorResp { - cursor: events.last().map(|e| e.id), - logs: events - .iter() - .map(|e| format!("{}: {}", e.author, e.content)) - .collect(), - })) - } - None => { - let cursor = state - .events - .get_latest_cursor() - .await - .map_err(AppError::Internal)?; - - Ok(Json(ServerMonitorResp { - cursor: Some(cursor), - logs: Vec::new(), - })) - } - } -} diff --git a/crates/churn/.gitignore b/crates/churn/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/crates/churn/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/crates/churn/CHANGELOG.md b/crates/churn/CHANGELOG.md deleted file mode 100644 index 55e42f0..0000000 --- a/crates/churn/CHANGELOG.md +++ /dev/null @@ -1,53 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## v0.1.0 (2023-08-26) - - - -### Chore - - - with changelog - -### New Features - - - with basic package - - with publish - - with monitoring - - with monitor - - with extra churning repl thingy - - add initial churn - - add simple health check - -### Commit Statistics - - - - - 11 commits contributed to the release over the course of 2 calendar days. - - 8 commits were understood as [conventional](https://www.conventionalcommits.org). - - 0 issues like '(#ID)' were seen in commit messages - -### Commit Details - - - -
view details - - * **Uncategorized** - - Release churn v0.1.0 (d5212f0) - - Release churn-domain v0.1.0, churn v0.1.0 (e4e05bc) - - With changelog (1ae70ac) - - Release churn-domain v0.1.0, churn v0.1.0 (34bc81e) - - With basic package (8f8c5fd) - - With publish (821e14f) - - With monitoring (e0545c7) - - With monitor (569f527) - - With extra churning repl thingy (10eae9b) - - Add initial churn (97978df) - - Add simple health check (f61d0bb) -
- diff --git a/crates/churn/Cargo.toml b/crates/churn/Cargo.toml deleted file mode 100644 index 813d6f8..0000000 --- a/crates/churn/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "churn" -authors.workspace = true -description.workspace = true -license-file.workspace = true -version= "0.1.0" -edition.workspace = true -publish.workspace = true - -[dependencies] -churn-domain.workspace = true - -anyhow.workspace = true -tokio.workspace = true -tracing.workspace = true -tracing-subscriber.workspace = true -clap.workspace = true -dotenv.workspace = true -axum.workspace = true -reqwest.workspace = true -uuid.workspace = true diff --git a/crates/churn/src/main.rs b/crates/churn/src/main.rs deleted file mode 100644 index 97c954d..0000000 --- a/crates/churn/src/main.rs +++ /dev/null @@ -1,154 +0,0 @@ -use churn_domain::{AgentEnrollReq, LeaseResp, ServerMonitorResp}; -use clap::{Parser, Subcommand}; - -#[derive(Parser)] -#[command(author, version, about, long_about = None, subcommand_required = true)] -struct Command { - #[command(subcommand)] - command: Option, -} - -#[derive(Subcommand)] -enum Commands { - Auth { - #[arg(env = "CHURN_SERVER", long)] - server: String, - - #[arg(env = "CHURN_SERVER_TOKEN", long)] - server_token: String, - }, - Bootstrap { - #[arg(env = "CHURN_AGENT", long)] - agent: String, - - #[arg(env = "CHURN_AGENT_NAME", long)] - agent_name: String, - - #[arg(env = "CHURN_SERVER", long)] - server: String, - - #[arg(env = "CHURN_SERVER_TOKEN", long)] - server_token: String, - }, - Health { - #[arg(env = "CHURN_SERVER", long)] - server: String, - #[arg(env = "CHURN_AGENT", long)] - agent: String, - }, - Monitor { - #[arg(env = "CHURN_SERVER", long)] - server: String, - - #[arg(env = "CHURN_SERVER_TOKEN", long)] - server_token: String, - }, -} - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - dotenv::dotenv().ok(); - tracing_subscriber::fmt::init(); - - let cli = Command::parse(); - - handle_command(cli).await?; - - Ok(()) -} - -async fn handle_command(cmd: Command) -> anyhow::Result<()> { - if let Some(cmd) = cmd.command { - match cmd { - Commands::Bootstrap { - agent, - agent_name, - server, - server_token: _, - } => { - tracing::info!("enrolling agent: {} for server: {}", agent, server); - let client = reqwest::Client::new(); - let req = client.post(format!("{server}/agent/lease")).build()?; - let lease_resp = client.execute(req).await?; - let lease = lease_resp.json::().await?; - - let req = client - .post(format!("{agent}/enroll")) - .json(&AgentEnrollReq { - lease: lease.token, - server, - agent_name, - }) - .build()?; - let lease_resp = client.execute(req).await?; - if !lease_resp.status().is_success() { - if let Ok(text) = lease_resp.text().await { - tracing::warn!( - "could not enroll because agent server encoutered error: {}", - text - ); - anyhow::bail!("encountered error: {}", text); - } - anyhow::bail!("encountered error"); - } - - Ok(()) - } - Commands::Health { server, agent } => { - tracing::info!("connecting to server: {}", server); - reqwest::get(format!("{server}/ping")).await?; - tracing::info!("connected to server successfully"); - tracing::info!("connecting to agent: {}", agent); - reqwest::get(format!("{agent}/ping")).await?; - tracing::info!("connected to agent successfully"); - Ok(()) - } - Commands::Auth { - server: _, - server_token: _, - } => todo!(), - Commands::Monitor { - server, - server_token: _, - } => { - tracing::info!("monitoring server: {}", server); - - let mut cursor: Option = None; - loop { - tracing::debug!("reading logs from server: {}", server); - - let resp = reqwest::get(format!( - "{server}/logs{}", - match &cursor { - None => "".to_string(), - Some(cursor) => format!("?cursor={}", cursor), - } - )) - .await?; - - if !resp.status().is_success() { - if let Ok(text) = resp.text().await { - anyhow::bail!("encountered error: {}", text); - } - anyhow::bail!("encountered error"); - } - - match resp.json::().await { - Ok(resp) => { - for line in resp.logs { - tracing::info!("event: {}", line); - } - cursor = resp.cursor; - } - Err(e) => { - tracing::warn!("failed to call server (error={})", e); - } - } - tokio::time::sleep(std::time::Duration::from_secs(1)).await; - } - } - } - } else { - panic!("no command supplied") - } -} diff --git a/crates/churning/Cargo.toml b/crates/churning/Cargo.toml deleted file mode 100644 index 1e07b70..0000000 --- a/crates/churning/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "churning" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -dagger-sdk = "0.11.0" -dagger-rust = {git = "https://git.front.kjuulh.io/kjuulh/dagger-components.git", ref = "main"} -tokio.workspace = true -eyre = "*" diff --git a/crates/churning/src/main.rs b/crates/churning/src/main.rs deleted file mode 100644 index b39b2af..0000000 --- a/crates/churning/src/main.rs +++ /dev/null @@ -1,136 +0,0 @@ -use std::{path::PathBuf, sync::Arc}; - -use dagger_rust::build::{RustVersion, SlimImage}; -use dagger_sdk::Query; -use tokio::io::{AsyncBufReadExt, AsyncWriteExt}; - -#[tokio::main] -async fn main() -> eyre::Result<()> { - // let mut config = Config::default(); - // config.logger = None; - - println!("Building churning..."); - - //let client = dagger_sdk::connect_opts(config).await?; - let client = dagger_sdk::connect().await?; - - let cli = build_container(client.clone(), "churn").await?; - let server = build_container(client.clone(), "churn-server").await?; - let server = server - .with_env_variable("CHURN_DATABASE", "sled") - .with_env_variable("CHURN_SLED_PATH", "/mnt/sled") - .with_mounted_cache("/mnt/sled", client.cache_volume("sled")) - .with_exec(vec!["churn-server", "serve", "--host", "0.0.0.0:3000"]) - .with_exposed_port(3000); - - let server_service = server.as_service(); - - let agent = build_container(client.clone(), "churn-agent").await?; - let agent = agent - .with_service_binding("churn-server", server_service.clone()) - .with_exec(vec!["churn-agent", "daemon", "--host", "0.0.0.0:3000"]) - .with_exposed_port(3000); - let agent_service = agent.as_service(); - - let churning = cli - .with_service_binding("churn-agent", agent_service) - .with_service_binding("churn-server", server_service) - .with_env_variable("CHURN_SERVER", "http://churn-server:3000") - .with_env_variable("CHURN_SERVER_TOKEN", "something") - .with_env_variable("CHURN_AGENT", "http://churn-agent:3000") - .with_env_variable("CHURN_AGENT_NAME", "churn-agent") - .with_exec(vec![ - "churn", - "health", - "--server", - "http://churn-server:3000", - "--agent", - "http://churn-agent:3000", - ]); - - let stdout = churning.stdout().await?; - println!("{stdout}"); - let stderr = churning.stderr().await?; - println!("{stderr}"); - - churning.sync().await?; - println!("Finished building churning..."); - - repl(churning).await?; //.with_entrypoint(vec!["churn"])).await?; - - Ok(()) -} - -async fn repl(container: dagger_sdk::Container) -> eyre::Result<()> { - loop { - let stdin = tokio::io::stdin(); - let mut stdout = tokio::io::stdout(); - - stdout.write_all(b"> ").await?; - stdout.flush().await?; - - let mut input = String::new(); - - let mut stdin = tokio::io::BufReader::new(stdin); - - stdin.read_line(&mut input).await?; - - let input = input.trim(); - if input == "q" { - break; - } - - let container = container.with_exec(input.split(' ').collect()); - - match container.stdout().await { - Ok(stdout) => { - println!("{stdout}"); - } - Err(e) => { - eprintln!("{}", e); - } - } - - match container.sync().await { - Ok(_) => {} - Err(_e) => { - //eprintln!("encountred error: {}", e); - } - } - } - - Ok(()) -} - -async fn build_container(client: Query, bin_name: &str) -> eyre::Result { - let crates = &["crates/*", "ci"]; - let debian_deps = &[ - "libssl-dev", - "pkg-config", - "openssl", - "git", - "jq", - "capnproto", - ]; - let debian_image = "debian:bullseye".to_string(); - - let images = dagger_rust::build::RustBuild::new(client.clone()) - .build_release( - None::, - RustVersion::Nightly, - crates, - debian_deps, - vec![SlimImage::Debian { - image: debian_image, - deps: debian_deps - .iter() - .map(|s| s.to_string()) - .collect::>(), - architecture: dagger_rust::build::BuildArchitecture::Amd64, - }], - bin_name, - ) - .await?; - - Ok(images.first().take().unwrap().clone()) -} diff --git a/cuddle.yaml b/cuddle.yaml deleted file mode 100644 index 2bdab1b..0000000 --- a/cuddle.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# yaml-language-server: $schema=https://git.front.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json - -base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-cli-plan.git" - -vars: - service: "churn" - registry: kasperhermansen - -please: - project: - owner: kjuulh - repository: churn - branch: main - settings: - api_url: https://git.front.kjuulh.io - -components: - packages: - debian: - dev: - - capnproto - release: - - capnproto - diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 7190a60..0000000 --- a/renovate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json" -}