Skip to content

Commit bbf0a36

Browse files
committed
Integrate PG into trigger2
Signed-off-by: Ryan Levick <[email protected]>
1 parent 8971708 commit bbf0a36

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

Cargo.lock

Lines changed: 2 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ 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" }
2122
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
2223
spin-factor-sqlite = { path = "../factor-sqlite" }
2324
spin-factor-variables = { path = "../factor-variables" }

crates/runtime-config/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use spin_factor_outbound_http::OutboundHttpFactor;
77
use spin_factor_outbound_mqtt::OutboundMqttFactor;
88
use spin_factor_outbound_networking::runtime_config::spin::SpinTlsRuntimeConfig;
99
use spin_factor_outbound_networking::OutboundNetworkingFactor;
10+
use spin_factor_outbound_pg::OutboundPgFactor;
1011
use spin_factor_outbound_redis::OutboundRedisFactor;
1112
use spin_factor_sqlite::runtime_config::spin as sqlite;
1213
use spin_factor_sqlite::SqliteFactor;
@@ -159,6 +160,12 @@ impl FactorRuntimeConfigSource<VariablesFactor> for TomlRuntimeConfigSource<'_>
159160
}
160161
}
161162

163+
impl FactorRuntimeConfigSource<OutboundPgFactor> for TomlRuntimeConfigSource<'_> {
164+
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
165+
Ok(None)
166+
}
167+
}
168+
162169
impl FactorRuntimeConfigSource<OutboundRedisFactor> for TomlRuntimeConfigSource<'_> {
163170
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
164171
Ok(None)

crates/trigger2/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ 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" }
2829
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
2930
spin-factor-sqlite = { path = "../factor-sqlite" }
3031
spin-factor-variables = { path = "../factor-variables" }

crates/trigger2/src/factors.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use spin_factor_key_value::KeyValueFactor;
44
use spin_factor_outbound_http::OutboundHttpFactor;
55
use spin_factor_outbound_mqtt::{NetworkedMqttClient, OutboundMqttFactor};
66
use spin_factor_outbound_networking::OutboundNetworkingFactor;
7+
use spin_factor_outbound_pg::OutboundPgFactor;
78
use spin_factor_outbound_redis::OutboundRedisFactor;
89
use spin_factor_sqlite::SqliteFactor;
910
use spin_factor_variables::VariablesFactor;
@@ -21,6 +22,7 @@ pub struct TriggerFactors {
2122
pub sqlite: SqliteFactor,
2223
pub redis: OutboundRedisFactor,
2324
pub mqtt: OutboundMqttFactor,
25+
pub pg: OutboundPgFactor,
2426
}
2527

2628
impl TriggerFactors {
@@ -39,6 +41,7 @@ impl TriggerFactors {
3941
sqlite: SqliteFactor::new(default_sqlite_label_resolver),
4042
redis: OutboundRedisFactor::new(),
4143
mqtt: OutboundMqttFactor::new(NetworkedMqttClient::creator()),
44+
pg: OutboundPgFactor::new(),
4245
}
4346
}
4447
}

0 commit comments

Comments
 (0)