gen

package
v0.0.0-...-c0a7434 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(schema Schema, out io.Writer) error

Generate generates the state machine

Types

type Callback

type Callback struct {
	Ins  []Param
	Outs []Param
}

Callback is a callback function signature

type Param

type Param struct {
	ID string
	V  interface{}
}

Param is a callback parameter

type Schema

type Schema struct {
	// Name is the state machine name
	Name,

	Pkg string
	// States is the states config
	States []State
}

Schema is the state machine schema

type State

type State struct {
	From        esmaq.StateType
	Transitions []Transition
}

State is the state configuration

type Transition

type Transition struct {
	To       esmaq.StateType
	Event    esmaq.EventType
	Callback Callback
}

Transition is the transition configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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