states

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrOnClient = ss.ErrOnClient

	Start         = ss.Start
	Ready         = ss.Ready
	HandshakeDone = ss.HandshakeDone
	Handshaking   = ss.Handshaking

	Connecting    = "Connecting"
	Connected     = "Connected"
	Disconnecting = "Disconnecting"
	Disconnected  = "Disconnected"
)

Variables

Names is an ordered list of all the state names.

View Source
var States = am.StructMerge(ss.States, am.Struct{
	ss.Start: {Add: S{Connecting}},
	ss.Ready: {
		Auto:    true,
		Require: S{HandshakeDone},
	},

	Connecting: {
		Require: S{Start},
		Remove:  GroupConnected,
	},
	Connected: {
		Require: S{Start},
		Remove:  GroupConnected,
		Add:     S{Handshaking},
	},
	Disconnecting: {
		Remove: GroupConnected,
	},
	Disconnected: {
		Auto:   true,
		Remove: GroupConnected,
	},

	HandshakeDone: am.StateAdd(ss.States[ss.HandshakeDone], am.State{
		Require: S{Connected},
	}),
})

States map defines relations and properties of states. Base on shared rpc states.

Functions

This section is empty.

Types

type S

type S = am.S

S is a type alias for a list of state names.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL