Skip to content

Commit 337fdeb

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

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
@@ -19,6 +19,7 @@ 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" }
2121
spin-factor-outbound-pg = { path = "../factor-outbound-pg" }
22+
spin-factor-outbound-mysql = { path = "../factor-outbound-mysql" }
2223
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
2324
spin-factor-sqlite = { path = "../factor-sqlite" }
2425
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
@@ -5,6 +5,7 @@ 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;
1011
use spin_factor_outbound_pg::OutboundPgFactor;
@@ -166,6 +167,12 @@ impl FactorRuntimeConfigSource<OutboundPgFactor> for TomlRuntimeConfigSource<'_>
166167
}
167168
}
168169

170+
impl FactorRuntimeConfigSource<OutboundMysqlFactor> for TomlRuntimeConfigSource<'_> {
171+
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
172+
Ok(None)
173+
}
174+
}
175+
169176
impl FactorRuntimeConfigSource<OutboundRedisFactor> for TomlRuntimeConfigSource<'_> {
170177
fn get_runtime_config(&mut self) -> anyhow::Result<Option<()>> {
171178
Ok(None)

crates/trigger2/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ 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" }
2828
spin-factor-outbound-pg = { path = "../factor-outbound-pg" }
29+
spin-factor-outbound-mysql = { path = "../factor-outbound-mysql" }
2930
spin-factor-outbound-redis = { path = "../factor-outbound-redis" }
3031
spin-factor-sqlite = { path = "../factor-sqlite" }
3132
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
@@ -3,6 +3,7 @@ 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;
78
use spin_factor_outbound_pg::OutboundPgFactor;
89
use spin_factor_outbound_redis::OutboundRedisFactor;
@@ -23,6 +24,7 @@ pub struct TriggerFactors {
2324
pub redis: OutboundRedisFactor,
2425
pub mqtt: OutboundMqttFactor,
2526
pub pg: OutboundPgFactor,
27+
pub mysql: OutboundMysqlFactor,
2628
}
2729

2830
impl TriggerFactors {
@@ -42,6 +44,7 @@ impl TriggerFactors {
4244
redis: OutboundRedisFactor::new(),
4345
mqtt: OutboundMqttFactor::new(NetworkedMqttClient::creator()),
4446
pg: OutboundPgFactor::new(),
47+
mysql: OutboundMysqlFactor::new(),
4548
}
4649
}
4750
}

0 commit comments

Comments
 (0)