Documentation
¶
Overview ¶
Package controller advances machines. It reads its inbox and its wakes in the store, takes one step at a time for each instance with something waiting, and writes down the result. Everything it does is a write to the store.
Index ¶
Constants ¶
const ( StepTime = 10 * time.Second StepMemory = 1 << 30 )
The limits of a step's process. A step of a small machine takes about 15 ms and 25 MiB.
const MaxMessage = 256 << 10
MaxMessage is the largest a message may be.
const StepArg = "step"
StepArg, after the argument that makes the binary run one job, makes it read one step.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller struct {
ID *identity.Identity
Store store.Store
// Now is the controller's clock.
Now func() time.Time
// SideBySide bounds how many store requests a pass has open at once,
// however much is owed.
SideBySide int
// AnyRunner has a job carried out whatever tags it names, as under
// corbie test.
AnyRunner bool
// Command starts the process of a step taken in a process of its own;
// by default, this binary.
Command []string
// StepTime is how long that process may run.
StepTime time.Duration
}
A Controller brings nothing with it but its key. Who it trusts, its trees, the secrets and values set at locations, and every instance are in the store.