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)
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)
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |