Expand description
The /v1 surface.
Loopback only, and 127.0.0.1 rather than localhost: the name resolves
to whatever the resolver says, which on a dual-stack seat is not always the
interface the writer bound. The address is the contract.
This layer decodes and encodes and nothing else. What a verb means lives in
crate::service.
Constants§
- DEFAULT_
PORT - The port the clients look for.
- DEFAULT_
WORKERS - Workers when the machine will not say how many cores it has.
- LOOPBACK
- The address the writer will bind, and no other.
- MAX_
WORKERS - The ceiling on workers. 32 threads each kept a 64 MB malloc arena (2 GB idle) on a 32-thread laptop.
Functions§
- serve
- Serve until the process is stopped.
- worker_
count - How many requests this writer will answer at once.