Skip to content

Commit

Permalink
create skeleton for step tools
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin67 committed Sep 21, 2024
1 parent f09ae9d commit dc1d0bc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions inngest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pub mod handler;
pub mod result;
pub mod sdk;
pub mod serve;
pub mod step_tool;

use config::Config;
use event::{Event, InngestEvent};
Expand Down
22 changes: 22 additions & 0 deletions inngest/src/step_tool.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
use std::collections::HashMap;

pub struct Step {
state: HashMap<String, String>,
}

impl Step {
// TODO: run

pub fn sleep(&self) {
// TODO: unhashed op
// TODO: hash it
// TODO: check if state has hashed_id as key already
// if not, throw to exit code execution
}

// TODO: sleep_until
// TODO: wait_for_event
// TODO: invoke
// TODO: send_event
// TODO: send_events
}

0 comments on commit dc1d0bc

Please sign in to comment.