package states
Import Path
/tools/relay/states (on go.dev)
Dependency Relation
imports 4 packages, and imported by 2 packages
Involved Source Files
Package states contains a stateful schema-v2 for Relay.
Bootstrapped with am-gen. Edit manually or re-gen & merge.
Package-Level Type Names (total 4)
RelayGroupsDef contains all the state groups Relay state machine.
var RelayGroups
RelayStatesDef contains all the states of the Relay state machine.
inherit from BasicStatesDef
ErrHandlerTimeout indicates one of the state machine handlers has timed
out.
ErrNetwork indicates a generic network error.
Healthcheck is a periodic request making sure that the machine is still
alive.
Heartbeat is a periodic state that ensures the integrity of the machine.
Ready indicates the machine meets criteria to perform work.
Start indicates the machine should be working. Removing start can force
stop the machine.
inherit from DisposedStatesDef
Disposed indicates that the machine has disposed allocated resources
and is ready to be garbage collected by calling [am.Machine.Dispose].
Disposing starts the machine disposal - first state-based and then calls
[am.Machine.Dispose].
RegisterDisposal registers a disposal handler passed under the
DisposedArgHandler key. Requires [DisposedHandlers] to be bound prior to
the registration. Handlers registered via RegisterDisposal can block.
HttpReady string
HttpStarting string
inherit from [ssdbg.ServerStatesDef]
ServerStatesDef.ClientMsg string
ServerStatesDef.ConnectEvent string
ServerStatesDef.DisconnectEvent string
ServerStatesDef.InitClient string
StatesBase *am.StatesBase
Exception is the only built-in state and mean a global error. All errors
have to [State.Require] the Exception state. If [Machine.PanicToErr] is
true, Exception will receive it.
New WebSocket to TCP-listen tunnel req
WsTunListenDisconn string
( RelayStatesDef) Names() machine.S
( RelayStatesDef) SetNames(names machine.S)
( RelayStatesDef) SetStateGroups(groups map[string][]int, order []string)
( RelayStatesDef) StateGroups() (map[string][]int, []string)
RelayStatesDef : github.com/pancsta/asyncmachine-go/pkg/machine.States
var RelayStates
WsTcpTunGroupsDef contains all the state groups WsTcpTun state machine.
var WsTcpTunGroups
WsTcpTunStatesDef contains all the states of the WsTcpTun state machine.
This is a one-way flow which ends in TcpAccepted, then disposes.
inherit from BasicStatesDef
ErrHandlerTimeout indicates one of the state machine handlers has timed
out.
ErrNetwork indicates a generic network error.
Healthcheck is a periodic request making sure that the machine is still
alive.
Heartbeat is a periodic state that ensures the integrity of the machine.
Ready indicates the machine meets criteria to perform work.
Start indicates the machine should be working. Removing start can force
stop the machine.
inherit from DisposedStatesDef
Disposed indicates that the machine has disposed allocated resources
and is ready to be garbage collected by calling [am.Machine.Dispose].
Disposing starts the machine disposal - first state-based and then calls
[am.Machine.Dispose].
RegisterDisposal registers a disposal handler passed under the
DisposedArgHandler key. Requires [DisposedHandlers] to be bound prior to
the registration. Handlers registered via RegisterDisposal can block.
err caused by TCP client
err caused by WebSocket / TCP server
StatesBase *am.StatesBase
Exception is the only built-in state and mean a global error. All errors
have to [State.Require] the Exception state. If [Machine.PanicToErr] is
true, Exception will receive it.
TCP client accepted
start listening on TCP port
TCP port listening
WebSocket connection OK
( WsTcpTunStatesDef) Names() machine.S
( WsTcpTunStatesDef) SetNames(names machine.S)
( WsTcpTunStatesDef) SetStateGroups(groups map[string][]int, order []string)
( WsTcpTunStatesDef) StateGroups() (map[string][]int, []string)
WsTcpTunStatesDef : github.com/pancsta/asyncmachine-go/pkg/machine.States
var WsTcpTunStates
Package-Level Variables (total 6)
RelayGroups contains all the state groups for the Relay machine.
RelaySchema represents all relations and properties of RelayStates.
RelayStates contains all the states for the Relay machine.
WsTcpTunGroups contains all the state groups for the WsTcpTun machine.
WsTcpTunSchema represents all relations and properties of WsTcpTunStates.
WsTcpTunStates contains all the states for the WsTcpTun machine.
![]() |
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. |