Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Machine ¶
Machine it lets change a behavior when the state changes
func (*Machine[S, A]) AddEndState ¶
func (m *Machine[S, A]) AddEndState(state S)
AddEndState for transition applies for handler and terminates when the end state is reached
func (*Machine[S, A]) AddState ¶
func (m *Machine[S, A]) AddState(state S, handler StateTransitionHandlerFunc[S, A])
AddState and associated with handler function for transition
func (*Machine[S, A]) MakeTransition ¶
func (m *Machine[S, A]) MakeTransition(handlerArgs A)
MakeTransition with given arguments
type StateTransitionHandlerFunc ¶
StateTransitionHandlerFunc that handling transitions between states and returns new
Click to show internal directories.
Click to hide internal directories.