Skip to content

Commit 132faa7

Browse files
authored
Merge pull request #2743 from fermyon/integrate-pg-mysql
2 parents 8971708 + 337fdeb commit 132faa7

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/runtime-config/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ spin-factor-key-value-azure = { path = "../factor-key-value-azure" }
1818
spin-factor-outbound-http = { path = "../factor-outbound-http" }
1919
spin-factor-outbound-mqtt = { path = "../factor-outbound-mqtt" }
2020
spin-factor-outbound-networking = { path = "../factor-outbound-networking" }
21+
spin-factor-outbound-pg = { path = "../factor-outbound-pg" }
22+
spin-factor-outbound-mysql = { path = "../factor-outbound-mysql" }
2123
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
2224
spin-factor-sqlite = { path = "../factor-sqlite" }
2325
spin-factor-variables = { path = "../factor-variables" }

crates/runtime-config/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ use spin_factor_key_value::runtime_config::spin::{self as key_value, MakeKeyValu
55
use spin_factor_key_value::{DefaultLabelResolver as _, KeyValueFactor};
66
use spin_factor_outbound_http::OutboundHttpFactor;
77
use spin_factor_outbound_mqtt::OutboundMqttFactor;
8+
use spin_factor_outbound_mysql::OutboundMysqlFactor;
89
use spin_factor_outbound_networking::runtime_config::spin::SpinTlsRuntimeConfig;
910
use spin_factor_outbound_networking::OutboundNetworkingFactor;
11+
use spin_factor_outbound_pg::OutboundPgFactor;
1012
use spin_factor_outbound_redis::OutboundRedisFactor;
1113
use spin_factor_sqlite::runtime_config::spin as sqlite;
1214
use spin_factor_sqlite::SqliteFactor;
@@ -159,6 +161,18 @@ impl FactorRuntimeConfigSource<VariablesFactor> for TomlRuntimeConfigSource<'_>
159161
}
160162
}
161163

164+
impl FactorRuntimeConfigSource<OutboundPgFactor> for TomlRuntimeConfigSource<'_> {
165+
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
166+
Ok(None)
167+
}
168+
}
169+
170+
impl FactorRuntimeConfigSource<OutboundMysqlFactor> for TomlRuntimeConfigSource<'_> {
171+
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
172+
Ok(None)
173+
}
174+
}
175+
162176
impl FactorRuntimeConfigSource<OutboundRedisFactor> for TomlRuntimeConfigSource<'_> {
163177
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
164178
Ok(None)

crates/trigger2/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ spin-factor-key-value = { path = "../factor-key-value" }
2525
spin-factor-outbound-http = { path = "../factor-outbound-http" }
2626
spin-factor-outbound-mqtt = { path = "../factor-outbound-mqtt" }
2727
spin-factor-outbound-networking = { path = "../factor-outbound-networking" }
28+
spin-factor-outbound-pg = { path = "../factor-outbound-pg" }
29+
spin-factor-outbound-mysql = { path = "../factor-outbound-mysql" }
2830
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
2931
spin-factor-sqlite = { path = "../factor-sqlite" }
3032
spin-factor-variables = { path = "../factor-variables" }

crates/trigger2/src/factors.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ use std::path::PathBuf;
33
use spin_factor_key_value::KeyValueFactor;
44
use spin_factor_outbound_http::OutboundHttpFactor;
55
use spin_factor_outbound_mqtt::{NetworkedMqttClient, OutboundMqttFactor};
6+
use spin_factor_outbound_mysql::OutboundMysqlFactor;
67
use spin_factor_outbound_networking::OutboundNetworkingFactor;
8+
use spin_factor_outbound_pg::OutboundPgFactor;
79
use spin_factor_outbound_redis::OutboundRedisFactor;
810
use spin_factor_sqlite::SqliteFactor;
911
use spin_factor_variables::VariablesFactor;
@@ -21,6 +23,8 @@ pub struct TriggerFactors {
2123
pub sqlite: SqliteFactor,
2224
pub redis: OutboundRedisFactor,
2325
pub mqtt: OutboundMqttFactor,
26+
pub pg: OutboundPgFactor,
27+
pub mysql: OutboundMysqlFactor,
2428
}
2529

2630
impl TriggerFactors {
@@ -39,6 +43,8 @@ impl TriggerFactors {
3943
sqlite: SqliteFactor::new(default_sqlite_label_resolver),
4044
redis: OutboundRedisFactor::new(),
4145
mqtt: OutboundMqttFactor::new(NetworkedMqttClient::creator()),
46+
pg: OutboundPgFactor::new(),
47+
mysql: OutboundMysqlFactor::new(),
4248
}
4349
}
4450
}

0 commit comments

Comments
 (0)