Documentation
¶
Overview ¶
Package wire is the JSON of the requests a client sends a gateway, which the gateway reads: one struct for each request. The gateway refuses a field it does not know.
Index ¶
Constants ¶
const ( InputPart = "input:" FilePart = "file:" )
The names of the parts of an upload form that hold files: input:<place> for a file of a start's input, and file:<path> for a file of a tree.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct {
Ticket string `json:"ticket"`
Value any `json:"value"`
Life machine.Duration `json:"life,omitzero"`
}
Answer answers a run's ticket.
type Event ¶
type Event struct {
Event string `json:"event"`
Data any `json:"data,omitzero"`
Life machine.Duration `json:"life,omitzero"`
}
Event is an event sent to a run.
type Send ¶
type Send struct {
To string `json:"to"`
Event string `json:"event"`
Data any `json:"data,omitzero"`
Life machine.Duration `json:"life,omitzero"`
}
Send is an event sent to an address: a location, or a location and a key.
type Setting ¶
type Setting struct {
Op string `json:"op"`
At string `json:"at,omitzero"`
Name string `json:"name,omitzero"`
Value string `json:"value,omitzero"`
Life machine.Duration `json:"life,omitzero"`
}
Setting is a set, a remove or a list of the secrets or the values a client may set.
type Start ¶
type Start struct {
At string `json:"at"`
Input any `json:"input,omitzero"`
Labels map[string]string `json:"labels,omitempty"`
Allow []string `json:"allow,omitempty"`
Deny []string `json:"deny,omitempty"`
Timeout machine.Duration `json:"timeout,omitzero"`
Life machine.Duration `json:"life,omitzero"`
}
Start is what the part named start of a request to start a run holds: the location and what the start carries.
type Submit ¶
type Submit struct {
At string `json:"at"`
Directory string `json:"directory"`
File string `json:"file,omitzero"`
Force bool `json:"force,omitzero"`
Life machine.Duration `json:"life,omitzero"`
}
Submit is what the part named submit of a request to submit a tree holds: the prefix the tree is recorded at, the directory it came from, which its machines read as run.context, for a tree of one file, the file, and whether the submit is forced.