Top 4.8% dependent repos on proxy.golang.org
Top 6.2% forks on proxy.golang.org
proxy.golang.org : github.com/Gurpartap/statemachine-go
Package statemachine provides a convenient implementation of a Finite-state Machine (FSM) in Go. Learn more about FSM on Wikipedia: Let's begin with an object that can suitably adopt state machine behaviour: Here we're embedding `statemachine.Machine` into our Turnstile struct. Embedding, although not necessary, is a suitable way to apply the state machine behaviour to the struct itself. Turnstile's DisplayMsg variable stores the text that is displayed to the user, and may store either "Pay" or "Go", depending on the state. Now let's set our state machine's definitions utilizing `MachineBuilder`: Now that our turnstile is ready, let's take it for a spin:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/%21gurpartap/statemachine-go
Keywords:
decision
, decision-trees
, declarative-routing
, deterministic-finite-automata
, finite-state-machine
, fsm
, go
, golang
, state
, state-machine
, statecharts
, statemachine
, workflow
License: Apache-2.0
Latest release: almost 6 years ago
First release: almost 6 years ago
Namespace: github.com/Gurpartap
Dependent repositories: 1
Stars: 66 on GitHub
Forks: 11 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 7 days ago