Commit graph

42 commits

Author SHA1 Message Date
eac0b668c9
fix: Don't assume UndefinedFunctionError means the module is not a Reactor. 2024-03-02 12:04:05 +13:00
eeb9614271
chore(deps): Update Spark v2.0.1. 2024-03-02 11:32:01 +13:00
37b9eda48e
feat: Add telemetry middleware. (#93)
* improvement: don't incur compile-time dependencies on middleware.

* feat: Add a middleware which emits telemetry events about Reactor.
2024-02-29 09:23:51 +13:00
ee72c64af9
fix: incorrect function arity for Group.after_fun DSL. 2024-02-27 11:00:09 +13:00
01fddd19b0
improvement!: Remove hooks and replace with middleware behaviour. (#90)
* improvement!: Remove hooks and replace with middleware behaviour.

* improvement(Middleware): Add `get_process_context/0` and `set_process_context/1` middleware hooks.

* improvement: Add step event callback to middleware.
2024-02-26 16:20:54 +13:00
387b8f875a
fix: callback spec for Reactor.Step.async?/1. 2024-02-15 14:19:07 +13:00
bd518f3040
perf: Don't iterate the entire graph every time through the loop. (#88) 2024-02-15 14:09:18 +13:00
769825874e
improvement: Move can?/2 and async?/1 into Reactor.Step behaviour. (#87)
Makes it a little bit easier for steps to define their own capabilities at runtime.
2024-02-15 10:55:09 +13:00
012d40e887
improvement: Add ability for steps to decide at runtime whether they should be run asyncronously. (#84) 2024-02-08 12:32:43 +13:00
9aa26b9f3b
feat: Add lifecycle hooks to Reactor (#83)
This will allow user code and extensions to add hook functions to run when the reactor starts, stops, fails, etc.
2024-02-08 11:09:35 +13:00
James Harton
4a57a92ba5
fix: don't deadlock when lots of async reactors are sharing a concurrency pool. (#36) 2023-09-28 11:08:47 +13:00
Zach Daniel
b8fbc672e7
docs: update hexdocs with new spark dsl tools (#59) 2023-09-27 16:23:55 +13:00
James Harton
ab84252311
fix: weird issue with aliases sometimes not being expanded in generated reactors. (#58) 2023-09-26 15:51:53 +13:00
James Harton
f67173b76f
feat: Add collect step entity. (#53)
This change introduces the `collect` step entity to the DSL. It is simply a wrapper around `Reactor.Step.ReturnAllArguments`, but provides the convenience of being able to group together arguments into a single structure for passing into other steps.
2023-09-11 11:58:29 +12:00
f58e8370e3
improvement(Template): Abstract template type so that it can be used by extensions. 2023-09-06 11:59:53 +12:00
f8e5292f3d
fix: Allow reactor DSL section to be patched. 2023-09-04 12:31:57 +12:00
445a3278d1
fix(Reactor): fix call to use Spark.Dsl. 2023-09-01 14:24:18 +12:00
James Harton
252d01ea22
improvement(Dsl): Extract DSL entities into their target modules. (#50)
This helps with reuse in extensions.
2023-09-01 13:44:34 +12:00
9a2738f98b
chore: update to Erlang 26 and Elixir 1.15.5. 2023-09-01 13:24:12 +12:00
James Harton
a9dd4c5c22
fix: Don't swallow errors when a step runs out of retries. (#41)
When a step runs out of retry attempts we either use the error supplied, or synthesise a new one.
2023-07-27 13:26:54 +12:00
James Harton
aa670a4a64
improvement: Add wait_for DSL. (#39) 2023-07-25 10:50:01 +12:00
James Harton
dd75458c76
improvement: Add "subpaths" to templates. (#31) 2023-07-12 07:36:06 +12:00
James Harton
be35183998
improvement(Step.Debug): Add debug step and DSL. (#30) 2023-07-11 12:04:01 +12:00
James Harton
4224aeb23c
improvement(Step.Switch): Add switch DSL and step type. (#29) 2023-07-11 07:20:51 +12:00
James Harton
efc7cb4a91
improvement: Add group DSL entity and Reactor.Step.Group. (#27) 2023-07-04 09:37:53 +12:00
65b302c891
chore: Add doctor. 2023-06-23 15:19:46 +12:00
James Harton
b985126894
improvement(Reactor.Executor): track concurrent process usage across multiple reactors. (#26) 2023-06-23 12:29:27 +12:00
James Harton
749e399c02
feat(Step.Around): Add ability to wrap a function around a group of steps. (#24) 2023-06-23 09:09:42 +12:00
027cf03fb8
perf(Dsl): Build and pre-plan DSL reactors. 2023-06-20 14:09:09 +12:00
e2ac25b69e
perf(Builder): build transformation steps as synchronous. 2023-06-20 13:40:43 +12:00
85bd7b77a2
fix(Executor): don't double-iterate the graph each time through the loop. 2023-06-20 13:34:49 +12:00
James Harton
611bf314f0
improvement: Support timeout and async? Reactor options. (#20) 2023-06-16 16:16:40 +12:00
James Harton
614e6725e2
improvement: Invert DSL entity building. (#19)
Instead of defining how to do it in `Reactor.Info` for all entities present and future, we use a protocol which entities must implement.  This allows us to support dynamically patched entities in the future without having to change core code.
2023-06-16 15:28:00 +12:00
James Harton
8f0248857a
improvement: Allow entire step behaviour to be defined in the DSL. (#18) 2023-06-16 14:39:29 +12:00
1af160c6b3 improvement: Add ability to compose reactors. 2023-06-15 14:57:32 +12:00
James Harton
8450554c41
improvement(Builder): rename internally generated steps to start with :__reactor__. (#10) 2023-06-08 13:25:11 +12:00
James Harton
b23e5ef688
improvement: Add step-wide argument transforms. (#9)
* improvement: Add step-wide argument transforms.

* docs: add more entity documentation.
2023-06-08 11:40:02 +12:00
1442cabeb4
fix(Reactor.Argument): Remove spurious is_atom constraint on Argument.from_input/2..3. 2023-05-15 17:10:53 +12:00
b94ab3ede3
docs: Add missing groups_for_modules needed for docs import into ash_hq. 2023-05-12 19:47:36 +12:00
James Harton
7b2e469135
improvement(Reactor.Step): remove can?/1 and replace with optional callbacks. (#6) 2023-05-12 15:50:49 +12:00
James Harton
7ac8cce871
feat: implement basic reactor behaviour. (#1) 2023-05-10 16:27:18 +12:00
Zach Daniel
96fd561714 init 2023-04-18 18:23:04 -04:00