Documentation
¶
Overview ¶
Package runnerproto defines the protocol between an app and the runner that hosts it. Framework packages and runners import it; apps do not.
Index ¶
Constants ¶
const ( RunnerSocket = "runner.sock" AppSocket = "app.sock" // MySQLSocket exists only when the app declares sqldb. MySQLSocket = "mysql.sock" )
Socket file names inside the runner directory.
const ( // DefaultCallDeadline applies to a call whose context has no deadline. DefaultCallDeadline = 10 * time.Second // MaxCallDeadline caps the deadline of every call. MaxCallDeadline = 30 * time.Second )
Deadlines of calls between apps.
const ( OriginHeader = "Aicoded-Origin" OriginRunner = "runner" )
The runner marks every refusal of a call between apps that it makes itself with the error metadata OriginHeader: OriginRunner. An error the called app returns never carries the mark, so an app reads an error code only from a marked error.
const EnvRunnerDir = "AICODED_RUNNER_DIR"
EnvRunnerDir names the only environment variable an app gets: the directory holding the runner's sockets.
const MaxForwardedTokenAge = 10 * time.Minute
MaxForwardedTokenAge is how long after issuing a viewer token the runner still accepts it back from the app, to call another app as that viewer: the lifetime of a live page connection.
const MaxMessageBytes = 16 << 20
MaxMessageBytes bounds one message on the runner socket: a runner refuses a larger request and an app a larger response.
const ProtocolVersion uint32 = 3
ProtocolVersion is the version of the app–runner protocol this framework speaks.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mailrules holds the rules every message must follow before a runner sends it: the idempotency key, plain addresses, header fields without line breaks or control characters, the allowed headers, sizes, mailbox folders and the pages of a mailbox list.
|
Package mailrules holds the rules every message must follow before a runner sends it: the idempotency key, plain addresses, header fields without line breaks or control characters, the allowed headers, sizes, mailbox folders and the pages of a mailbox list. |
|
Package socket connects apps and runners over Unix sockets using HTTP/2 without TLS.
|
Package socket connects apps and runners over Unix sockets using HTTP/2 without TLS. |
|
Package viewer signs and verifies the short-lived viewer tokens a runner attaches to every request it forwards to an app.
|
Package viewer signs and verifies the short-lived viewer tokens a runner attaches to every request it forwards to an app. |