Documentation ¶
Overview ¶
Package gofsm is a library for building finite-state machines (automata).
Why yet another FSM library for go?
gofsm is aimed squarely at home automation - human visible, configured and friendly. The configuration format is yaml, and easy to read/write by hand.
gofsm is used in the gohome automation project: http://github.com/barnybug/gohome
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Automata ¶
func (*Automata) Persist ¶
func (self *Automata) Persist() AutomataState
func (*Automata) Restore ¶
func (self *Automata) Restore(s AutomataState)
type AutomataState ¶
type AutomataState map[string]AutomatonState
type Automaton ¶
type Automaton struct { Start string States map[string]struct { Entering Actions Leaving Actions } Transitions map[string][]Transition Name string State *State Since time.Time // contains filtered or unexported fields }
func (*Automaton) ChangeState ¶
type AutomatonState ¶
type Transition ¶
Click to show internal directories.
Click to hide internal directories.