package helpers

Import Path
	/pkg/x/helpers (on go.dev)

Dependency Relation
	imports 8 packages, and imported by one package

Involved Source Files Package helpers provides experimental and unstable helpers.
Package-Level Type Names (total 2)
/* sort by: | */
func FanOutIn(mach *am.Machine, name string, total, concurrency int, fn FanFn) (any, error)
Package-Level Functions (total 7)
ErrFromCtxs returns the first non-nil error from a list of contexts.
FanOutIn creates [total] number of state pairs of "Name1" and "Name1Done", as well as init and merge states ("Name", "NameDone"). [name] is treated as a namespace and can't have other states within. Retry can be achieved by adding the init state repetively. FanOutIn can be chained, but it should be called before any mutations or telemetry (as it changes the state struct). The returned handlers struct can be used to adjust the concurrency level.
NestedState forwards the mutation to one of the composed submachines. Parent state should be a Multi state and only called directly (not from a relation). TODO test case, solve locking by passing the event to the submachine
Type Parameters: T: *any
func RelationsMatrix(mach *am.Machine) ([][]int, error)
TimeMatrix returns a matrix of state clocks for the given machines.
func TransitionMatrix(tx, prevTx *am.Transition, index am.S) ([][]int, error)