Expand description
The HTTP API, served over TLS only.
Structs§
- App
- What the API serves from.
- Connection
Limits - How long a connection may take over each step before it is closed, and how long the listener waits after it could take no connection.
- Limits
- The limits from configuration that the API applies to every request.
- Report
Gate - One listener’s count of the reports of the current minute.
- Report
Limits - How many reports a listener takes.
Enums§
- After
Failure - What the listener does after it could take no connection.
- TlsError
- Why the TLS configuration could not be made.
Constants§
- OPENAPI
- The OpenAPI description of every route, as
GET /openapi.jsonserves it and the website publishes it.
Traits§
- Accept
- Where connections come from: a bound socket, or in a test one that fails first.
Functions§
- after_
failure - What follows a failed accept. A connection that ended before it was taken is its own failure; anything else is the system’s.
- router
- The routes, served from
app. - serve
- Serves
apponlistenerover TLS untilshutdowncompletes, within the defaultConnectionLimits. A connection whose handshake fails, such as plain HTTP, is dropped; the server goes on. - serve_
observed serve_within, callingfulleach time the listener finds every one of its places held: once for each time it fills, however long it stays full and however many connections wait. The listener also logs a warning then, at most once a minute.- serve_
within serve, withinlimits. A failed accept never ends serving: the listener goes on, afterlimits.accept_pausewhen the failure is the system’s (after_failure). A connection is closed when its handshake is not done withinlimits.handshake, when no request head has arrived withinlimits.first_headof the handshake, when an HTTP/1.1 request head takes longer thanlimits.headfrom its first bytes, and when it has waitedlimits.idlefor its next request. The listener holds at mostlimits.maxconnections at once.- tls_
config - The server’s TLS configuration from a PEM certificate chain and a PEM
private key, the files
tls.certandtls.keyname. - tls_
config_ named tls_config, for a key file that the configuration keynamednames, so a refusal of the file says which key to look at.