-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
745 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ members = [ | |
"host", | ||
"infra", | ||
"integrtion-tests", | ||
"acl" | ||
] | ||
|
||
[workspace.dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name="acl" | ||
version="0.0.1" | ||
edition="2021" | ||
|
||
[dependencies] | ||
log = "0.4.20" | ||
env_logger = "0.10.0" | ||
tokio = { version = "1.33.0", features = ["full"] } | ||
messaging = { path = "../messaging" } | ||
domain = { path = "../domain" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# build image | ||
FROM rust:1.73.0-slim-buster as build | ||
WORKDIR /web-api | ||
COPY . . | ||
RUN apt-get update && apt-get install -y build-essential \ | ||
openssl libssl-dev \ | ||
zlib1g \ | ||
cmake | ||
|
||
RUN --mount=type=cache,target=/web-api/target cargo build --release && cp target/release/acl /acl | ||
|
||
# acl image | ||
FROM debian:buster-slim as acl | ||
COPY --from=build /acl /acl | ||
CMD ["/acl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use domain::events::ActivityEvent; | ||
use log::info; | ||
use messaging::kafka::{IKafkaFactory, KafkaConfig, KafkaFactory}; | ||
use std::sync::Arc; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
std::env::set_var("RUST_LOG", "info"); | ||
env_logger::init(); | ||
|
||
let config = KafkaConfig::new(); | ||
let kafka_factory: Arc<dyn IKafkaFactory<ActivityEvent>> = Arc::new(KafkaFactory::new(config)); | ||
kafka_factory | ||
.create_consumer() | ||
.consume(&|message| { | ||
info!("message: '{:?}'", message); | ||
}) | ||
.await; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker-compose build |
Oops, something went wrong.