package states
Import Path
/pkg/node/states (on go.dev)
Dependency Relation
imports 4 packages, and imported by 3 packages
Package-Level Type Names (total 7)
BootstrapStatesDef contains all the states of the Bootstrap state machine.
The target state is WorkerAddr, activated by an aRPC client.
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.
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.
inherit from StateSourceStatesDef
ErrOnClient indicates an error added on the Network Machine.
WorkerAddr - The awaited worker passed its connection details.
( BootstrapStatesDef) Names() machine.S
( BootstrapStatesDef) SetNames(names machine.S)
( BootstrapStatesDef) SetStateGroups(groups map[string][]int, order []string)
( BootstrapStatesDef) StateGroups() (map[string][]int, []string)
BootstrapStatesDef : github.com/pancsta/asyncmachine-go/pkg/machine.States
var BootstrapStates
ClientGroupsDef contains all the state groups of the Client state machine.
ConnectedGroupsDef *ss.ConnectedGroupsDef
ConnectedGroupsDef.Connected S
var ClientGroups
ClientStatesDef contains all the states of the Client 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.
Start indicates the machine should be working. Removing start can force
stop the machine.
inherit from ConsumerStatesDef
ServerPayload RPC server delivers the requested payload to the Client.
ErrSupervisor string
ErrWorker string
Exception string
Ready - Client is connected to a worker and ready to delegate work and
receive payloads.
StatesBase *am.StatesBase
SuperConnected string
SuperConnecting string
SuperDisconnected string
SuperDisconnecting string
SuperReady - Client is fully connected to the Supervisor.
WorkerConnected string
WorkerConnecting string
WorkerDisconnected string
WorkerDisconnecting string
WorkerReady string
WorkerRequested - Client has requested a NetMach from the Supervisor.
( ClientStatesDef) Names() machine.S
( ClientStatesDef) SetNames(names machine.S)
( ClientStatesDef) SetStateGroups(groups map[string][]int, order []string)
( ClientStatesDef) StateGroups() (map[string][]int, []string)
ClientStatesDef : github.com/pancsta/asyncmachine-go/pkg/machine.States
var ClientStates
SupervisorGroupsDef contains all the state groups of the Supervisor state
machine.
ConnectedGroupsDef *ssam.ConnectedGroupsDef
ConnectedGroupsDef.Connected S
Errors list all possible errors of Supervisor.
PoolNormalized async
PoolStatus are pool's possible statuses, 1 active at a time.
var SupervisorGroups
SupervisorStatesDef contains all the states of the Supervisor 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.
Start indicates the machine should be working. Removing start can force
stop the machine.
ClientConnected - At least 1 client is connected to the supervisor.
ClientDisconnected - 1 Client has disconnected from the supervisor.
ClientSendPayload - payload delivered to the RPC server with for clients
as mutation args.
ErrPool string
ErrWorker string
ForkWorker - Supervisor starts forking a new worker by creating a new aRPC
server.
ForkingWorker - Supervisor is forking a new worker.
Heartbeat checks the health of the worker pool and network connections.
KillWorker string
KillingWorker string
ListWorkers is a getter returning a list of workers via a channel, with
filters.
LocalRpcReady string
NormalizingPool - Supervisor is re-spawning some workers.
PoolNormalized - Supervisor has normalized the pool. Check PoolReady for
the result.
PoolReady - Minimum amount of workers are ready.
PoolStarting - Supervisor is starting workers to meet the pool definition.
ProvideWorker - Client requests a new worker.
PublicRpcReady string
Ready - Supervisor is ready to accept new clients.
SetWorker is a setter for a worker, which can also delete worker entries.
inherit from StateSourceStatesDef
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.
ErrOnClient indicates an error added on the Network Machine.
SuperConnected string
SuperDisconnected string
SuperSendPayload - payload delivered to the RPC server for supervisors
as mutation args.
WorkerForked - New worker connected to bootstrap.
WorkerForked - Supervisor has successfully forked a new worker.
WorkerGone - One of the workers has disconnected.
WorkerIssues - Client complains about the worker.
WorkerKilled string
WorkerReady - One of the workers become ready.
TODO all warm warkers ready
PoolWarm string
WorkersAvailable - There are some idle workers in the pool.
( SupervisorStatesDef) Names() machine.S
( SupervisorStatesDef) SetNames(names machine.S)
( SupervisorStatesDef) SetStateGroups(groups map[string][]int, order []string)
( SupervisorStatesDef) StateGroups() (map[string][]int, []string)
SupervisorStatesDef : github.com/pancsta/asyncmachine-go/pkg/machine.States
var SupervisorStates
WorkerGroupsDef contains all the state groups of the NetMach state machine.
WorkStatus represents work-related states, 1 active at a time. This group
has to be bound by the implementation, e.g. using Add relation from custom
work states.
var WorkerGroups
WorkerStatesDef contains all the states of the NetMach 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.
Start indicates the machine should be working. Removing start can force
stop the machine.
ClientConnected - NetMach is connected to a client.
Send payload to the client
ErrClient string
ErrSupervisor string
ErrWork string
ErrWorkTimeout string
Idle string
LocalRpcReady - Supervisor RPC server is ready for connections.
PublicRpcReady - Client RPC server is ready for connections.
Ready - NetMach is able to perform work.
RpcReady - both RPC servers are ready.
ServeClient - NetMach is requested to accept a connection from client
am.A["id"].
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.
inherit from StateSourceStatesDef
ErrOnClient indicates an error added on the Network Machine.
SuperConnected - NetMach is connected to the Supervisor.
Send payload to the supervisor
WorkReady string
WorkRequested string
Working string
( WorkerStatesDef) Names() machine.S
( WorkerStatesDef) SetNames(names machine.S)
( WorkerStatesDef) SetStateGroups(groups map[string][]int, order []string)
( WorkerStatesDef) StateGroups() (map[string][]int, []string)
WorkerStatesDef : github.com/pancsta/asyncmachine-go/pkg/machine.States
var WorkerStates
Package-Level Variables (total 11)
BootstrapSchema represents all relations and properties of
BootstrapStatesDef.
BootstrapStates contains all the states for the Bootstrap machine.
ClientGroups contains all the state groups for the Client machine.
ClientSchema represents all relations and properties of ClientStates.
ClientStates contains all the states for the Client machine.
SupervisorGroups contains all the state groups for the Supervisor machine.
SupervisorSchema represents all relations and properties of SupervisorStates.
SupervisorStates contains all the states for the Supervisor machine.
WorkerGroups contains all the state groups for the NetMach machine.
WorkerSchema represents all relations and properties of WorkerStates.
WorkerStates contains all the states for the NetMach 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. |