Documentation ¶
Index ¶
Constants ¶
View Source
const (
OnErrorEvent = EventType("error")
)
Variables ¶
View Source
var ( ErrorEventDoesNotExist = "event type does not exist" ErrorCbExist = "callback already registered" )
Functions ¶
This section is empty.
Types ¶
type IStateMachine ¶
type IStateMachine interface { Close() error Send(event *Event) error On(eventType EventType, cb Callback) error }
func NewGameMachine ¶
func NewGameMachine() IStateMachine
type StateMachine ¶
type StateMachine struct {
// contains filtered or unexported fields
}
func (*StateMachine) Close ¶
func (machine *StateMachine) Close() error
func (*StateMachine) Send ¶
func (machine *StateMachine) Send(event *Event) error
Click to show internal directories.
Click to hide internal directories.