fsm

package
v2.0.0-...-c26a417 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const ANY = -1

Variables

This section is empty.

Functions

func Transition

func Transition(stateTable map[int][]State, currentState int, input interface{}, output interface{}, data interface{}) int

Types

type Matcher

type Matcher interface {
	Matches(input interface{}) bool
}

type State

type State struct {
	Input    Matcher
	NewState int
	Action   TransitionFunction
}

type TransitionFunction

type TransitionFunction func(state int, input interface{}, output interface{}, data interface{})

Jump to

Keyboard shortcuts

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