Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Create chimp controller service
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Sep 29, 2023
1 parent 55afff6 commit 67de705
Show file tree
Hide file tree
Showing 15 changed files with 692 additions and 1 deletion.
191 changes: 190 additions & 1 deletion backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"chimp_chomp",
"chimp_controller",
"chimp_protocol",
"graphql_endpoints",
"graphql_event_broker",
Expand Down
24 changes: 24 additions & 0 deletions backend/chimp_controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "chimp_controller"
version = "0.1.0"
edition = "2021"

[dependencies]
anyhow = { workspace = true }
async-tungstenite = { version = "0.22.0", features = ["tokio-runtime"] }
chimp_protocol = { path = "../chimp_protocol" }
clap = { workspace = true }
cynic = { version = "3.2.2", features = ["http-reqwest"] }
dotenvy = { workspace = true }
futures-util = { version = "0.3.28" }
graphql-ws-client = { version = "0.5.0", features = ["cynic"] }
lapin = { version = "2.2.1", default-features = false, features = ["rustls"] }
reqwest = "0.11.20"
serde_json = "1.0.107"
tokio = { workspace = true, features = ["sync"] }
url = { workspace = true }
uuid = { workspace = true }

[build-dependencies]
cynic-codegen = { version = "3.2.2" }
targeting = { path = "../targeting" }
3 changes: 3 additions & 0 deletions backend/chimp_controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Chimp Controller

A small shim service which is designed to listen to the `imageCreated` subscription endpoint of the `targeting` service and generate jobs for `chimp_chomp`. When `chimp_chomp` completes the job this service will format the response and send it to the `targeting` service.
8 changes: 8 additions & 0 deletions backend/chimp_controller/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use targeting::root_schema_builder;

fn main() {
let schema = root_schema_builder().finish();
cynic_codegen::register_schema("targeting")
.from_sdl(&schema.sdl())
.unwrap();
}
Loading

0 comments on commit 67de705

Please sign in to comment.