| Age | Commit message (Collapse) | Author |
|
Replace direct == checks with errors.Is so wrapped errors are handled
correctly (authkeys Verify, daemon server/EOF, Magefile uninstall).
Refs: ask r3, 100 Go Mistakes #51
Made-with: Cursor
|
|
Replace Handler with NewHandler(statsDir) (http.Handler, error) when the
auth store cannot be opened, matching Run's error wrapping. Tests use a
small helper; add coverage for open failure on a read-only stats dir.
Made-with: Cursor
|
|
Configure ReadHeaderTimeout, ReadTimeout, WriteTimeout, and IdleTimeout
on the daemon listener to mitigate slowloris and stuck clients.
Made-with: Cursor
|
|
Use a mutex-wrapped buffer for slog and io.Copy so polling String()
does not race concurrent writes from Run and background goroutines.
Made-with: Cursor
|
|
Add table-driven HTTP and unit tests for report (all formats, negatives),
upload/auth boundaries, upload helpers, readiness, Run and logging.
Extend authkeys tests for Close, CreateKey validation, and post-close errors.
Add CLI tests for defaultListenFromEnv and create-client-key with -auth-db only.
Add mage CoverMicroservice for local/CI-style coverage measurement.
Use context.Background and os.Chdir for Go 1.21-compatible tests.
Made-with: Cursor
|
|
Liveness: GET /livez matches GET /health (200, process serving).
Readiness: GET /readyz verifies stats-dir exists, is a directory, and is
readable and writable; if -auth-db resolves outside stats-dir, that
directory is checked too. Failures return 503 Service Unavailable.
Refs: ask task 53
Made-with: Cursor
|
|
Document daemon plain-HTTP mode, PUT /upload paths for five uptimed
files, Bearer token header, and env flags. Add table-driven test
asserting each kind maps to the expected filename in stats-dir.
Made-with: Cursor
|
|
- Add internal/authkeys with SHA-256 hashed tokens and KeyCount gate
- PUT /upload/{host}/{kind} for uptimed files; auth when any key exists
- Daemon -auth-db and Config.AuthDB; plain HTTP unchanged
- CLI: goprecords --create-client-key HOSTNAME (-stats-dir|-auth-db)
Made-with: Cursor
|
|
- Add FormatHTML with parse/string and HTMLReporter on existing report path
- Emit minimal HTML document with escaped title, description, and pre table
- Daemon /report sets text/html Content-Type for HTML format
- Integration fixtures and tests for HTML
Made-with: Cursor
|
|
- Route http.Server ErrorLog and request access lines through slog text to
stdout (or Config.LogOutput for tests).
- Log daemon_listen on start and http_request per request (method, path,
status, duration_ms).
- CLI daemon: flag usage and missing-stats-dir message on stdout.
Made-with: Cursor
|
|
Accept Category, Metric, and OutputFormat as alternate query keys
alongside category, metric, output-format. Serve Gemtext reports
with text/gemini; assert Content-Type in daemon tests.
Builds on y2 daemon GET /report reusing ParseReportQuery and
WriteReports.
Made-with: Cursor
|
|
Long-lived goprecords --daemon with -stats-dir and -listen, env
GOPRECORDS_STATS_DIR and GOPRECORDS_LISTEN. Serves GET /health and
GET /report (query params match report flags). Uses standard
http.Server; no TLS.
Made-with: Cursor
|