Skip to content

Commit

Permalink
feat: webhook-connector (#2355)
Browse files Browse the repository at this point in the history
  • Loading branch information
duonganhthu43 authored Jan 30, 2024
1 parent 58c85e3 commit c6850f8
Show file tree
Hide file tree
Showing 13 changed files with 1,032 additions and 39 deletions.
92 changes: 54 additions & 38 deletions 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 dozer-ingestion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dozer-ingestion-mysql = { path = "./mysql" }
dozer-ingestion-object-store = { path = "./object-store" }
dozer-ingestion-postgres = { path = "./postgres" }
dozer-ingestion-snowflake = { path = "./snowflake", optional = true }
dozer-ingestion-webhook = { path = "./webhook" }

tokio = { version = "1", features = ["full"] }
futures = "0.3.28"
Expand Down
4 changes: 4 additions & 0 deletions dozer-ingestion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use dozer_ingestion_postgres::{
};
#[cfg(feature = "snowflake")]
use dozer_ingestion_snowflake::connector::SnowflakeConnector;
use dozer_ingestion_webhook::connector::WebhookConnector;
use errors::ConnectorError;
use tokio::runtime::Runtime;

Expand Down Expand Up @@ -132,6 +133,9 @@ pub fn get_connector(
ConnectionConfig::Dozer(dozer_config) => {
Ok(Box::new(NestedDozerConnector::new(dozer_config)))
}
ConnectionConfig::Webhook(webhook_config) => {
Ok(Box::new(WebhookConnector::new(webhook_config)))
}
ConnectionConfig::JavaScript(javascript_config) => Ok(Box::new(JavaScriptConnector::new(
runtime,
javascript_config,
Expand Down
15 changes: 15 additions & 0 deletions dozer-ingestion/webhook/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "dozer-ingestion-webhook"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dozer-ingestion-connector = { path = "../connector" }
actix-web = "4.4.1"
env_logger = "0.11.1"

[dev-dependencies]
tokio = { version = "1.0", features = ["full", "test-util"] }
reqwest = { version = "0.11.23", features = ["json", "blocking"] }
Loading

0 comments on commit c6850f8

Please sign in to comment.