v0.26.2 http sink backlog for late streams, web updates
This commit is contained in:
1 parent
cdd4fc01a7
commit
d745a128a2
14 files changed
+115
-37
No files matched your search
+2
-1
@@ -177,7 +177,8 @@ unknown key fails and lists the valid ones. A `path` is a file, a directory
|
||||
- `tail`: follow files to stdout, like `tail -F`
|
||||
- `path` (required), `from`, `format` (`raw`)
|
||||
- `serve`: a live stream, an [http sink](sinks.md#http): a browser at
|
||||
`listen` gets the viewer, `/stream` is SSE
|
||||
`listen` gets the viewer, `/stream` is SSE, each stream starting with the
|
||||
last 1000 entries
|
||||
- `path`, `from`, `format` (`json`), `listen` (`127.0.0.1:8080`)
|
||||
- `tls`: `off` (default), `self` (a self-signed certificate made at
|
||||
startup), `issuer` (one signed by `issuer_cert` and `issuer_key`), or
|
||||
|
||||
@@ -304,7 +304,8 @@ Follow files to standard output, like
|
||||
.It Cm serve Oo Cm path , listen , format , tls , users , proxy , viewer , allow , deny Oc
|
||||
Serve a live HTTP stream on
|
||||
.Cm listen
|
||||
.Pq default Li 127.0.0.1:8080 .
|
||||
.Pq default Li 127.0.0.1:8080 ,
|
||||
each stream starting with the last 1000 entries.
|
||||
.Cm tls
|
||||
is
|
||||
.Cm off ,
|
||||
|
||||
+5
-2
@@ -170,6 +170,9 @@ Options, each as type and default:
|
||||
- `client_buffer_size` (int, `256`): per-client send queue depth.
|
||||
- `write_timeout_ms` (int, `0`): per-event write deadline; `0` = none.
|
||||
- `max_connections` (int, `0`): concurrent stream cap; `0` = unlimited.
|
||||
- `replay_lines` (int, `0`; `1000` from the `serve` preset): the last entries
|
||||
a new stream gets after its `connected` event, before the live ones, so a
|
||||
browser opened late sees a backlog; `0` = none.
|
||||
- `login_page` (bool, `false`): `scram` in proxy mode only (an error
|
||||
elsewhere): the browser login page at `/auth/login`.
|
||||
- `viewer_page` (bool, `false`): `scram` in proxy mode only (an error
|
||||
@@ -212,8 +215,8 @@ Options, each as type and default:
|
||||
- never under `scram` on the sink's own TLS, which a browser cannot log in
|
||||
to: `/` is refused like any other path;
|
||||
- an endpoint at `/` keeps the root, and the viewer stays at `/auth/view`.
|
||||
The viewer shows entries from when it connects (the sink keeps no backlog)
|
||||
and holds one stream against `max_connections`.
|
||||
The viewer starts with the `replay_lines` backlog, holds one stream against
|
||||
`max_connections`, and says so when all are taken (`server full`).
|
||||
- Refusals are logged at WARN and counted in `auth_rejected`. The authorized
|
||||
identity is recorded in the client's session as `auth_method` /
|
||||
`auth_identity`.
|
||||
|
||||
+4
-11
@@ -65,16 +65,11 @@ identity, and both skeletons download the tagged source.
|
||||
|
||||
Smaller items found along the way, each independent of the others.
|
||||
|
||||
1. A late browser sees no backlog: the `http` sink keeps none, so the viewer
|
||||
shows entries from when it connects. A bounded replay (a `replay_lines`
|
||||
option, sent after `event: connected`) would fill it. The viewer also hides
|
||||
a `503` from `max_connections` behind "retrying"; the status JSON it already
|
||||
fetches could name it.
|
||||
2. Level detection. `source.ExtractLogLevel` needs a delimiter after the name
|
||||
1. Level detection. `source.ExtractLogLevel` needs a delimiter after the name
|
||||
(`ERROR:`, `[WARN]`, ` INFO `), so `warning disk full` or `DBG x` get no
|
||||
level, hence no color. Match the names as words, as the console sink's
|
||||
painter does, with one table for both.
|
||||
3. Command line:
|
||||
2. Command line:
|
||||
- a positional word at the top level (`lw tail`, `lw -t FILE`) still reaches
|
||||
config with an unclear message; name it ("unexpected argument X; the file
|
||||
is -c FILE");
|
||||
@@ -84,11 +79,9 @@ Smaller items found along the way, each independent of the others.
|
||||
- `lw tls cert --host` could become `--hosts` (keeping `--host`), to match
|
||||
`tls.hosts` and the preset key;
|
||||
- top-level usage errors exit 1, subcommand ones 2.
|
||||
4. `GET /favicon.ico` answers 404; the logo could serve as the icon once the
|
||||
pages' CSP allows `img-src 'self'`.
|
||||
5. TLS: the generated-certificate key is one per process, so a pin taken from a
|
||||
3. TLS: the generated-certificate key is one per process, so a pin taken from a
|
||||
`self_signed` listener also matches an `issuer` listener of the same
|
||||
process; document it or key per listener. Pins are checked in
|
||||
`VerifyPeerCertificate`, which Go skips on resumption: guard it if a dialer
|
||||
ever keeps a `ClientSessionCache`.
|
||||
6. `core.ShutdownTimeout` is unused.
|
||||
4. `core.ShutdownTimeout` is unused.
|
||||
Reference in new issue
Block a user