Skip to content

Commit 32ab262

Browse files
authored
Merge pull request #837 from hieblmi/fsm-notif-context
fsm: add event context to notification struct
2 parents 0ab40fe + 93413ff commit 32ab262

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fsm/fsm.go

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ type Notification struct {
7676
NextState StateType
7777
// Event is the event that was processed.
7878
Event EventType
79+
// EventContext is the event context that was processed.
80+
EventContext EventContext
7981
// LastActionError is the error returned by the last action executed.
8082
LastActionError error
8183
}
@@ -222,6 +224,7 @@ func (s *StateMachine) SendEvent(event EventType, eventCtx EventContext) error {
222224
PreviousState: s.previous,
223225
NextState: s.current,
224226
Event: event,
227+
EventContext: eventCtx,
225228
LastActionError: s.LastActionError,
226229
}
227230

0 commit comments

Comments
 (0)