diff --git a/.gitignore b/.gitignore index 869df07..5195f75 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target -Cargo.lock \ No newline at end of file +Cargo.lock +*.sock \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 63852cd..d463e2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,11 @@ [workspace] resolver = "2" members = [ - "crates/api-puller", - "crates/snmp-puller", - "crates/integr-config", - "crates/data-transfer", - "crates/integrd", + "crates/api-grub", "crates/config-delivery", "crates/preproc", ] [profile.dev] debug = true [profile.test] -debug = false \ No newline at end of file +debug = false diff --git a/crates/api-grub/Cargo.toml b/crates/api-grub/Cargo.toml new file mode 100644 index 0000000..364c431 --- /dev/null +++ b/crates/api-grub/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "api-grub" +version = "0.1.0" +edition = "2021" + +[dependencies] +serde = { version = "1.0.217", features = ["derive"] } +serde_json = "1.0.135" +tokio = { version = "1.43.0", features = ["full"] } diff --git a/crates/api-grub/config.json b/crates/api-grub/config.json new file mode 100644 index 0000000..82e9c89 --- /dev/null +++ b/crates/api-grub/config.json @@ -0,0 +1,4 @@ +{ + "api-endpoint" : "http://127.0.0.1:8081/ping", + "method" : "GET" +} \ No newline at end of file diff --git a/crates/api-grub/src/main.rs b/crates/api-grub/src/main.rs new file mode 100644 index 0000000..2a04848 --- /dev/null +++ b/crates/api-grub/src/main.rs @@ -0,0 +1,5 @@ + +#[tokio::main(flavor = "multi_thread")] +async fn main() { + println!("Hello, world!"); +} diff --git a/crates/api-puller/Cargo.toml b/crates/config-delivery/Cargo.toml similarity index 70% rename from crates/api-puller/Cargo.toml rename to crates/config-delivery/Cargo.toml index d08d434..bd6024b 100644 --- a/crates/api-puller/Cargo.toml +++ b/crates/config-delivery/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "api-puller" +name = "config-delivery" version = "0.1.0" edition = "2021" diff --git a/crates/api-puller/src/main.rs b/crates/config-delivery/src/main.rs similarity index 100% rename from crates/api-puller/src/main.rs rename to crates/config-delivery/src/main.rs diff --git a/crates/data-transfer/Cargo.toml b/crates/data-transfer/Cargo.toml deleted file mode 100644 index 55bc1dd..0000000 --- a/crates/data-transfer/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "data-transfer" -version = "0.1.0" -edition = "2021" - -[dependencies] diff --git a/crates/integr-config/Cargo.toml b/crates/integr-config/Cargo.toml deleted file mode 100644 index 729c337..0000000 --- a/crates/integr-config/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "integr-config" -version = "0.1.0" -edition = "2021" - -[dependencies] diff --git a/crates/integr-config/src/main.rs b/crates/integr-config/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/crates/integr-config/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -} diff --git a/crates/integrd/src/main.rs b/crates/integrd/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/crates/integrd/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -} diff --git a/crates/integrd/Cargo.toml b/crates/preproc/Cargo.toml similarity index 78% rename from crates/integrd/Cargo.toml rename to crates/preproc/Cargo.toml index 487bcf5..1b55bd2 100644 --- a/crates/integrd/Cargo.toml +++ b/crates/preproc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "integrd" +name = "preproc" version = "0.1.0" edition = "2021" diff --git a/crates/data-transfer/src/main.rs b/crates/preproc/src/main.rs similarity index 100% rename from crates/data-transfer/src/main.rs rename to crates/preproc/src/main.rs diff --git a/crates/snmp-puller/Cargo.toml b/crates/snmp-puller/Cargo.toml deleted file mode 100644 index 2d6ed5c..0000000 --- a/crates/snmp-puller/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "snmp-puller" -version = "0.1.0" -edition = "2021" - -[dependencies] diff --git a/crates/snmp-puller/src/main.rs b/crates/snmp-puller/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/crates/snmp-puller/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -}