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 ¶
const AskLife = 3 * time.Second
AskLife is how long a message waits to be taken up before it is dropped.
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.
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.