fact

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fact is what happens to an entity: a fact is told to it and carried until it goes, a loop of a plan begins on it or waits for it; a message is a fact with its sender.

Index

Constants

View Source
const AskLife = 3 * time.Second

AskLife is how long a message waits to be taken up before it is dropped.

View Source
const MaxChain = 4

MaxChain is how many times a message of one type may be passed on, the first sender's counted.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fact

type Fact interface{ Fact() }

Fact marks a type as a fact an entity carries: a component that comes and goes, told by whoever perceives. A type is one by its method Fact, a mark never called, confirmed where it is defined: var _ fact.Fact = Arrived{}.

type From

type From struct {
	By   uid.UID64
	At   time.Duration // on the clock
	Hops uint8         // how many times the message was passed on
}

From is what a message carries of its sender. A command embedding it, given with plan.Other.Do, lands on that entity as a fact in place of going to a queue, the engine filling in who sent it; one without a plan takes none. A loop of the command's type answers it, plan.Other.Do again.

func (From) Fact

func (From) Fact()

Fact: a message is a fact of whom it is sent to.

func (*From) Message

func (f *From) Message() *From

Message is the sender's part of a command embedding From, for the engine to fill in.

func (From) Sent

func (f From) Sent() From

Sent is the sender's part as a fact carried reads it.

func (From) Subject

func (f From) Subject() (uid.UID64, bool)

Subject is the sender.

type Message

type Message interface{ Message() *From }

Message is a command embedding From: sent to the other as a fact in place of a queue.

type Sent

type Sent interface{ Sent() From }

Sent is a fact that is a message, read where it landed.

type Subject

type Subject interface{ Subject() (uid.UID64, bool) }

Subject is a fact or a moment about another entity, whom an Aimed command or a message given on it goes to; false for nobody just now.

Jump to

Keyboard shortcuts

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