Skip to content

Commit

Permalink
Merge pull request #2743 from fermyon/integrate-pg-mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
rylev authored Aug 22, 2024
2 parents 8971708 + 337fdeb commit 132faa7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions crates/runtime-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ spin-factor-key-value-azure = { path = "../factor-key-value-azure" }
spin-factor-outbound-http = { path = "../factor-outbound-http" }
spin-factor-outbound-mqtt = { path = "../factor-outbound-mqtt" }
spin-factor-outbound-networking = { path = "../factor-outbound-networking" }
spin-factor-outbound-pg = { path = "../factor-outbound-pg" }
spin-factor-outbound-mysql = { path = "../factor-outbound-mysql" }
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
spin-factor-sqlite = { path = "../factor-sqlite" }
spin-factor-variables = { path = "../factor-variables" }
Expand Down
14 changes: 14 additions & 0 deletions crates/runtime-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ use spin_factor_key_value::runtime_config::spin::{self as key_value, MakeKeyValu
use spin_factor_key_value::{DefaultLabelResolver as _, KeyValueFactor};
use spin_factor_outbound_http::OutboundHttpFactor;
use spin_factor_outbound_mqtt::OutboundMqttFactor;
use spin_factor_outbound_mysql::OutboundMysqlFactor;
use spin_factor_outbound_networking::runtime_config::spin::SpinTlsRuntimeConfig;
use spin_factor_outbound_networking::OutboundNetworkingFactor;
use spin_factor_outbound_pg::OutboundPgFactor;
use spin_factor_outbound_redis::OutboundRedisFactor;
use spin_factor_sqlite::runtime_config::spin as sqlite;
use spin_factor_sqlite::SqliteFactor;
Expand Down Expand Up @@ -159,6 +161,18 @@ impl FactorRuntimeConfigSource<VariablesFactor> for TomlRuntimeConfigSource<'_>
}
}

impl FactorRuntimeConfigSource<OutboundPgFactor> for TomlRuntimeConfigSource<'_> {
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
Ok(None)
}
}

impl FactorRuntimeConfigSource<OutboundMysqlFactor> for TomlRuntimeConfigSource<'_> {
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
Ok(None)
}
}

impl FactorRuntimeConfigSource<OutboundRedisFactor> for TomlRuntimeConfigSource<'_> {
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
Ok(None)
Expand Down
2 changes: 2 additions & 0 deletions crates/trigger2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ spin-factor-key-value = { path = "../factor-key-value" }
spin-factor-outbound-http = { path = "../factor-outbound-http" }
spin-factor-outbound-mqtt = { path = "../factor-outbound-mqtt" }
spin-factor-outbound-networking = { path = "../factor-outbound-networking" }
spin-factor-outbound-pg = { path = "../factor-outbound-pg" }
spin-factor-outbound-mysql = { path = "../factor-outbound-mysql" }
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
spin-factor-sqlite = { path = "../factor-sqlite" }
spin-factor-variables = { path = "../factor-variables" }
Expand Down
6 changes: 6 additions & 0 deletions crates/trigger2/src/factors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use std::path::PathBuf;
use spin_factor_key_value::KeyValueFactor;
use spin_factor_outbound_http::OutboundHttpFactor;
use spin_factor_outbound_mqtt::{NetworkedMqttClient, OutboundMqttFactor};
use spin_factor_outbound_mysql::OutboundMysqlFactor;
use spin_factor_outbound_networking::OutboundNetworkingFactor;
use spin_factor_outbound_pg::OutboundPgFactor;
use spin_factor_outbound_redis::OutboundRedisFactor;
use spin_factor_sqlite::SqliteFactor;
use spin_factor_variables::VariablesFactor;
Expand All @@ -21,6 +23,8 @@ pub struct TriggerFactors {
pub sqlite: SqliteFactor,
pub redis: OutboundRedisFactor,
pub mqtt: OutboundMqttFactor,
pub pg: OutboundPgFactor,
pub mysql: OutboundMysqlFactor,
}

impl TriggerFactors {
Expand All @@ -39,6 +43,8 @@ impl TriggerFactors {
sqlite: SqliteFactor::new(default_sqlite_label_resolver),
redis: OutboundRedisFactor::new(),
mqtt: OutboundMqttFactor::new(NetworkedMqttClient::creator()),
pg: OutboundPgFactor::new(),
mysql: OutboundMysqlFactor::new(),
}
}
}
Expand Down

0 comments on commit 132faa7

Please sign in to comment.