life

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotAlive

func IsNotAlive(v Value) bool

IsNotAlive is a Predicate that returns true if the supplied value is not Alive.

This generally indicates that the entity in question is at some stage of destruction/cleanup.

func IsNotDead

func IsNotDead(v Value) bool

IsNotDead is a Predicate that returns true if the supplied value is not Dead.

This generally indicates that the entity in question is active in some way, and can probably not be completely destroyed without consequences.

Types

type Predicate

type Predicate func(Value) bool

Predicate is a predicate.

type Value

type Value string

Value indicates the state of some entity.

const (
	// Alive indicates that some entity is meant to exist.
	Alive Value = "alive"

	// Dying indicates that some entity should be removed.
	Dying Value = "dying"

	// Dead indicates that some entity is no longer useful,
	// and can be destroyed unconditionally.
	Dead Value = "dead"
)

func (Value) Validate

func (v Value) Validate() error

Validate returns an error if the value is not known.

Jump to

Keyboard shortcuts

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