diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-14 11:37:13 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-14 11:37:13 +0300 |
| commit | 299aa6727025c4f888ec2a38b8945ed39159a99c (patch) | |
| tree | 8b03f4869f89fb25164f1dcb47213ef7ffeafeb9 /internal/daemon/daemon.go | |
| parent | a9a8896a7af324c3588984230d51fe2e15aba30c (diff) | |
docs: add godoc for exports (ask 04)
Document Record, Open, CreateSchema, ResetRecords, ImportFromDir, LoadRecords
in storage; Reporter and reporters in goprecords; Fields and Parse in
recordline; Config and Run in daemon.
Made-with: Cursor
Diffstat (limited to 'internal/daemon/daemon.go')
| -rw-r--r-- | internal/daemon/daemon.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/daemon/daemon.go b/internal/daemon/daemon.go index 876fc81..852051a 100644 --- a/internal/daemon/daemon.go +++ b/internal/daemon/daemon.go @@ -24,6 +24,7 @@ const ( defaultIdleTimeout = 2 * time.Minute ) +// Config holds settings for the HTTP report/upload daemon. type Config struct { StatsDir string Addr string @@ -107,6 +108,7 @@ func newDaemonHTTPServer(addr string, handler http.Handler, errLog *log.Logger) } } +// Run starts the HTTP server for cfg until ctx is canceled, then shuts down gracefully. func Run(ctx context.Context, cfg Config) error { if cfg.StatsDir == "" { return fmt.Errorf("stats directory is required") |
