wire

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 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 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

View Source
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 Cancel

type Cancel struct {
	Life machine.Duration `json:"life,omitzero"`
}

A Cancel, an Event and an Answer may each say how long the message is good for.

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 Removed

type Removed struct {
	At   string           `json:"at"`
	Life machine.Duration `json:"life,omitzero"`
}

Removed is the prefix of a tree to remove.

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.

Jump to

Keyboard shortcuts

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