Expand description
Task logs, read from the worker that ran the attempt (see archive/PROJECT.md, Task logs): the webserver proxies them, so clients never reach workers.
A worker’s address is what it advertised when it registered (workers.log_endpoint), so
it is found by the worker’s ID. Every answer names the worker that gave it
(Schedr-Worker-Id): an address that now belongs to another worker is noticed instead of
passing for a deleted log. Requests to workers never go through an HTTP proxy, and in
tls.mode = "app" present the webserver’s certificate and expect the worker’s to name
[tls] worker_name.
Structs§
- Http
LogSource - Logs from workers over HTTP (TLS in
appmode), never through a proxy. - Masked
Part - A part of a log as shown: masked, whole lines only.
- Worker
Log - A part of a log, as a worker gave it.
Enums§
- LogFetch
Error - Why a worker gave no log.
Constants§
- CONNECT_
TIMEOUT - How long connecting to a worker may take.
- REQUEST_
TIMEOUT - How long a whole request to a worker may take.
Traits§
- LogSource
- Where the webserver gets logs from (workers over HTTP; something else in tests).
Functions§
- masked_
lines bytes, a part of a log, as shown: masked (a task may print an address with its password), whole lines only, so no secret is shown in pieces (a reader picks where a part starts and how long it is). Not starting a line (at_linefalse), it starts after its first newline, all of it skipped when it has none. Withmoreto come, it ends after its last newline, the rest left for the next part. With none in it, it waits for its line’s end, unless it isfull(as long as asked) and starts a line: then it is shown to its last whitespace (its last token may go on), ending with a note that it is cut, and the rest of that line is skipped, as a part not starting a line is. A short part shows a line’s start at most, never its pieces.before, the bytes just before the part, is masked with it, not shown: a value begun there (a quoted one going on over lines) is hidden in the part too.- text_of
bytesas text, and how many of them it covers: a character cut at the end (more of the log follows) is left for the next part, so following a log never garbles one; invalid bytes becomeU+FFFD.
Type Aliases§
- LogFuture
- The future of a
LogSource::fetch.