parser

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	InitialState string
	Transitions  map[string][]string
	Wildcards    []string
	Timeouts     map[string]TimeoutRule
}

Config holds the parsed FSM definition from a tag.

func Parse

func Parse(tag string) (*Config, error)

Parse parses an FSM tag string into a Config.

type TimeoutRule

type TimeoutRule struct {
	FromState string
	ToState   string
	Duration  time.Duration
}

TimeoutRule defines an automatic transition after a duration.

Jump to

Keyboard shortcuts

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