runnerproto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

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

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

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

View Source
const EnvRunnerDir = "AICODED_RUNNER_DIR"

EnvRunnerDir names the only environment variable an app gets: the directory holding the runner's sockets.

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

View Source
const MaxMessageBytes = 16 << 20

MaxMessageBytes bounds one message on the runner socket: a runner refuses a larger request and an app a larger response.

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

Jump to

Keyboard shortcuts

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