package pipes
Import Path
/pkg/states/pipes (on go.dev)
Dependency Relation
imports 6 packages, and imported by 5 packages
Involved Source Files
Package pipes provide helpers to pipe states from one machine to another.
Package-Level Functions (total 11)
Add adds a pipe for an Add mutation between [source] and [target] machines,
for a single target state.
targetState: defaults to sourceState
AddFlat is like [Add], but skips unnecessary mutations.
Bind binds an arbitrary state to custom states using Add and Remove.
Empty [activeState] and [inactiveState] defaults to [source]. Each binding
creates a separate handler struct, unlike in BindMany.
BindAny binds a whole machine via the global AnyState handler and Set
mutation. The target mutates the same number of times as the source.
BindConnected binds a [ss.ConnectedSchema] machine to 4 custom states. Each
one is optional and bound with Add/Remove.
BindErr binds Exception to a custom state using Add. Empty state defaults to
[am.StateException], and a custom state will also add [am.StateException].
TODO godoc
BindReady binds Ready to custom states using Add/. Empty state
defaults to Ready.
BindStart binds Start to custom states using Add/Remove. Empty state
defaults to Start.
Remove adds a pipe for a Remove mutation between source and target
machines, for a single target state.
targetState: defaults to sourceState
func RemoveFlat(source, target am.Api, sourceState string, targetState string) am.HandlerFinal
![]() |
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. |