akka / akka-edge-rs

Akka Edge support in Rust
https://doc.akka.io/docs/akka-edge/current/
Other
9 stars 1 forks source link

Tidying up a few APIs #11

Closed huntc closed 1 year ago

huntc commented 1 year ago

A few APIs have been tidied up, with some refactoring to Fn (tightening closure constraints).

Along the way, I provided a more diligent approach to saving offsets i.e. a periodic saving given idle event handling. We could introduce different strategies in future, but I think this works reasonably well given the targetting of at-least-once behaviour.

I have also simplified the commit log source provider so that by default, it constructs for all slices. There's an alternate constructor if we'd like to provide the ranges in future.

The Streambed storage projection has also been simplified in recognition that a projection has only one source provider (I had confused projections with the sharded daemon!).

Some new tests have also been added.