Skip to content

Commit

Permalink
middleware skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin67 committed May 29, 2024
1 parent 70a08f2 commit 22e42b3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions lib/inngest/middleware.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
defmodule Inngest.Middleware do
@moduledoc """
Inngest Middleware specification
"""

@type opts ::
binary()
| tuple()
| atom()
| integer()
| float()
| [opts]
| map()

@callback init(opts) :: opts

@callback transform_input(map(), opts) :: map()

@callback before_memoization(map(), opts) :: map()

@callback after_memoization(map(), opts) :: map()

@callback before_execution(map(), opts) :: map()

@callback after_execution(map(), opts) :: map()

@callback transform_output(map(), opts) :: map()

@callback before_response(map(), opts) :: map()

@callback before_send_events(map(), opts) :: map()

@callback after_send_events(map(), opts) :: map()
end

0 comments on commit 22e42b3

Please sign in to comment.