From 93413ffbbbd5e824b4c2a7f519e26a783f2a2471 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 16 Oct 2024 20:39:11 +0200 Subject: [PATCH] fsm: add event context to notification struct --- fsm/fsm.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fsm/fsm.go b/fsm/fsm.go index a00577470..f1088a767 100644 --- a/fsm/fsm.go +++ b/fsm/fsm.go @@ -76,6 +76,8 @@ type Notification struct { NextState StateType // Event is the event that was processed. Event EventType + // EventContext is the event context that was processed. + EventContext EventContext // LastActionError is the error returned by the last action executed. LastActionError error } @@ -222,6 +224,7 @@ func (s *StateMachine) SendEvent(event EventType, eventCtx EventContext) error { PreviousState: s.previous, NextState: s.current, Event: event, + EventContext: eventCtx, LastActionError: s.LastActionError, }