states

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// WorkerStates contains all the states for the Worker machine.
	WorkerStates = ws

	// WorkerGroups contains all the state groups for the Worker machine.
	WorkerGroups = wg
)
View Source
var SAdd = am.SAdd

SAdd 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 StateSet = am.StateSet

StateSet is a func alias for replacing parts of an existing state definition.

View Source
var StructMerge = am.StructMerge

StructMerge is a func alias for extending an existing state structure.

View Source
var WorkerStruct = StructMerge(

	ssrpc.WorkerStruct,
	am.Struct{

		ws.CallOp: {
			Multi:   true,
			Require: S{ws.Start},
		},

		ws.Event: {
			Multi:   true,
			Require: S{ws.Start},
		},

		ws.Value1: {Remove: wg.Values},
		ws.Value2: {Remove: wg.Values},
		ws.Value3: {Remove: wg.Values},
	})

WorkerStruct represents all relations and properties of WorkerStates.

Functions

This section is empty.

Types

type S

type S = am.S

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

type WorkerGroupsDef

type WorkerGroupsDef struct {

	// Values group contains mutually exclusive values.
	Values S
}

WorkerGroupsDef contains all the state groups of the Worker state machine.

type WorkerStatesDef

type WorkerStatesDef struct {
	Event  string
	Value1 string
	Value2 string
	Value3 string
	CallOp string

	// inherit from WorkerStatesDef
	*ssrpc.WorkerStatesDef
}

WorkerStatesDef contains all the states of the Worker state machine.

Jump to

Keyboard shortcuts

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