Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Refactor 'evented data' so that it is the saga that is evented, rather than the data. #62

Merged
merged 2 commits into from
May 26, 2018

Conversation

jmalloc
Copy link
Owner

@jmalloc jmalloc commented May 26, 2018

This is in preparation for #10, which requires separation of the event handling and the data instance.

…r than the data.

This is in preparation for #10, which requires separation of the event handling and the data instance.
@codecov-io
Copy link

codecov-io commented May 26, 2018

Codecov Report

Merging #62 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #62   +/-   ##
=======================================
  Coverage   45.71%   45.71%           
=======================================
  Files          38       38           
  Lines        1387     1387           
=======================================
  Hits          634      634           
  Misses        743      743           
  Partials       10       10

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bd1fca...d70a1ac. Read the comment docs.

@@ -114,3 +100,19 @@ func (aggregateRoot) HandleMessage(

return
}

// ApplyEvent updates the data to reflect the fact that ev has occurred.
func (aggregateRoot) ApplyEvent(d saga.Data, env ax.Envelope) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this method is now on the aggregateRoot (the saga.Saga implementation), not the saga data itself.

@jmalloc jmalloc requested a review from koden-km May 26, 2018 00:35
@jmalloc
Copy link
Owner Author

jmalloc commented May 26, 2018

@koden-km Added you to this one for interest sake, but I'll merge away so I can make use of this elsewhere.

@jmalloc jmalloc merged commit df57404 into master May 26, 2018
@jmalloc jmalloc deleted the 10-evented-saga branch May 26, 2018 00:36
Copy link
Collaborator

@koden-km koden-km left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants