fsm

package module
v0.0.0-...-fd085db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 0 Imported by: 0

README

fsm

minimal idiomatic Go FSM (finite state machine)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Activate

func Activate(s State) (funcErr error)

Activate activates the state and it's consecutive states until the next state is nil or encounters an error

Types

type State

type State interface {
	Activate() (State, error)
}

State represents a state activity

type StateFunc

type StateFunc func() (State, error)

StateFunc is a function that satisfies the State interface

func (StateFunc) Activate

func (stateFn StateFunc) Activate() (State, error)

Activate satisfies the State interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL