states

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package states contains a stateful schema-v2 for a CLI. Bootstrapped with am-gen. Edit manually or re-gen & merge.

Index

Constants

This section is empty.

Variables

View Source
var (

	// DaemonStates contains all the states for the Daemon machine.
	DaemonStates = ssD
	// DaemonGroups contains all the state groups for the Daemon machine.
	DaemonGroups = sgD
)
View Source
var DaemonSchema = SchemaMerge(

	ss.BasicSchema,

	ss.DisposedSchema,

	ssrpc.StateSourceSchema,
	am.Schema{
		ssD.OpFoo1: {
			Require: S{ssD.Start},
			Remove:  sgD.Ops,
		},
		ssD.OpBar2: {
			Require: S{ssD.Start},
			Remove:  sgD.Ops,
		},
		ssD.Cmd: {},
	})

DaemonSchema represents all relations and properties of DaemonStates.

Functions

This section is empty.

Types

type DaemonGroupsDef

type DaemonGroupsDef struct {
	Ops S
}

DaemonGroupsDef contains all the state groups Daemon state machine.

type DaemonStatesDef

type DaemonStatesDef struct {
	*am.StatesBase

	OpFoo1 string
	OpBar2 string

	// Cmd send a cobra command to the daemon. TODO
	Cmd string

	// inherit from BasicStatesDef
	*ss.BasicStatesDef
	// inherit from DisposedStatesDef
	*ss.DisposedStatesDef
	// inherit from StateSourceStatesDef
	*ssrpc.StateSourceStatesDef
}

DaemonStatesDef contains all the states of the Daemon state machine.

Jump to

Keyboard shortcuts

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