文件名称:stateless:转到用于创建状态机的库
文件大小:166KB
文件格式:ZIP
更新时间:2024-04-02 09:10:55
go golang fsm state-machine statechart
无状态 直接在Go代码中创建状态机和基于轻量级状态机的工作流: phoneCall := stateless . NewStateMachine ( stateOffHook ) phoneCall . Configure ( stateOffHook ). Permit ( triggerCallDialed , stateRinging ) phoneCall . Configure ( stateRinging ). OnEntryFrom ( triggerCallDialed , func ( _ context. Context , args ... interface {}) error { onDialed ( args [ 0 ].( string )) return nil }). Permit ( triggerCallConnected
【文件预览】:
stateless-master
----statemachine.go(16KB)
----triggers_test.go(455B)
----graph.go(4KB)
----.github()
--------FUNDING.yml(63B)
--------workflows()
----states.go(8KB)
----assets()
--------stateless.svg(121KB)
--------phone-graph.png(55KB)
----example_test.go(3KB)
----states_test.go(14KB)
----statemachine_test.go(35KB)
----LICENSE(1KB)
----config.go(8KB)
----triggers.go(4KB)
----.gitignore(192B)
----go.sum(968B)
----README.md(9KB)
----go.mod(89B)