Documentation
¶
Overview ¶
Package relaynet puts containers on a class network through the relay (github.com/go-wasmcontainers/relay): one driver.Session per engine, one endpoint per container, as the relay's docs/NETWORKDRIVER.md describes. Addresses and names are the relay's ("<container>", or "<container>.<student>.<domain>"); the firewall is the teacher's.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is a NetworkDriver over one relay session.
type Joined ¶
type Joined struct {
*Driver
// contains filtered or unexported fields
}
Joined is a connected class session that keeps its token fresh.
func Connect ¶
Connect opens the data channel with a session token and refreshes the token before it expires (RefreshSession, then REAUTH: no flow drops).
func Join ¶
Join is the student's side of a class: it trades a join code for a session token at the relay's API (base, e.g. https://relay:8443), then connects the data channel (wss://…/v1/data). The token never appears in a URL. hc is the HTTP client (its TLS configuration trusts the relay).