Skip to content

Commit

Permalink
fix: apply unix flag to n2c source
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Mar 3, 2024
1 parent 94e3150 commit c800b59
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub mod utxorpc;

pub enum Bootstrapper {
N2N(n2n::Stage),

#[cfg(target_family = "unix")]
N2C(n2c::Stage),

#[cfg(feature = "aws")]
Expand All @@ -30,6 +32,8 @@ impl Bootstrapper {
pub fn borrow_output(&mut self) -> &mut SourceOutputPort {
match self {
Bootstrapper::N2N(p) => &mut p.output,

#[cfg(target_family = "unix")]
Bootstrapper::N2C(p) => &mut p.output,

#[cfg(feature = "aws")]
Expand All @@ -43,6 +47,8 @@ impl Bootstrapper {
pub fn spawn(self, policy: gasket::runtime::Policy) -> Tether {
match self {
Bootstrapper::N2N(x) => gasket::runtime::spawn_stage(x, policy),

#[cfg(target_family = "unix")]
Bootstrapper::N2C(x) => gasket::runtime::spawn_stage(x, policy),

#[cfg(feature = "aws")]
Expand Down Expand Up @@ -73,6 +79,8 @@ impl Config {
pub fn bootstrapper(self, ctx: &Context) -> Result<Bootstrapper, Error> {
match self {
Config::N2N(c) => Ok(Bootstrapper::N2N(c.bootstrapper(ctx)?)),

#[cfg(target_family = "unix")]
Config::N2C(c) => Ok(Bootstrapper::N2C(c.bootstrapper(ctx)?)),

#[cfg(feature = "aws")]
Expand Down

0 comments on commit c800b59

Please sign in to comment.