StateMachineImpl 状态机实现
| 86 | |
| 87 | // StateMachineImpl 状态机实现 |
| 88 | type StateMachineImpl struct { |
| 89 | name string |
| 90 | states map[string]State |
| 91 | transitions map[string][]*Transition |
| 92 | currentState string |
| 93 | history []*StateTransition |
| 94 | stateData map[string]any |
| 95 | mu sync.RWMutex |
| 96 | persistentStore StatePersistentStore |
| 97 | } |
| 98 | |
| 99 | // StatePersistentStore 状态持久化接口 |
| 100 | type StatePersistentStore interface { |
nothing calls this directly
no outgoing calls
no test coverage detected