Documentation ¶
Index ¶
Constants ¶
View Source
const ( Start = ss.Start Ready = ss.Ready HandshakeDone = ss.HandshakeDone Handshaking = ss.Handshaking RpcStarting = "RpcStarting" RpcReady = "RpcReady" ClientConn = "ClientConn" ClientDisconn = "ClientDisconn" ErrNetwork = ss.ErrNetwork ErrClient = ss.ErrRpc )
Variables ¶
View Source
var ( GroupRPC = S{RpcStarting, RpcReady} GroupClientConn = S{ClientConn, ClientDisconn} )
View Source
var Names = SMerge(ss.Names, S{ RpcStarting, RpcReady, ClientConn, ClientDisconn, })
Names is an ordered list of all the state names.
View Source
var SMerge = am.SAdd
SMerge is a func alias for merging lists of states.
View Source
var StateAdd = am.StateAdd
StateAdd is a func alias for adding to an existing state definition.
View Source
var States = StructMerge(ss.States, am.Struct{ ss.ErrNetwork: StateAdd(ss.States[ss.ErrNetwork], am.State{ Remove: S{ClientConn}, }), ss.Start: {Add: S{RpcStarting}}, ss.Ready: { Auto: true, Require: S{HandshakeDone, RpcReady}, }, RpcStarting: { Require: S{ss.Start}, Remove: GroupRPC, }, RpcReady: { Require: S{ss.Start}, Remove: GroupRPC, }, ClientConn: { Require: S{RpcReady}, Remove: GroupClientConn, }, ClientDisconn: { Auto: true, Require: S{RpcReady}, Remove: GroupClientConn, }, })
States map defines relations and properties of states. Base on shared rpc states.
View Source
var StructMerge = am.StructMerge
StructMerge is a func alias for extending an existing state structure.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.