diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-24 22:55:26 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-24 22:55:26 +0200 |
| commit | 78e9de77d8c443fe8dbe560b5ccb168a6142eb55 (patch) | |
| tree | b18f0e45c2bac79b36466ca291ba118a3b8b0f78 /internal/flamegraph/webserver.go | |
| parent | 6a761bac0d866f2f3a3b224b603446630803e362 (diff) | |
add docs
Diffstat (limited to 'internal/flamegraph/webserver.go')
| -rw-r--r-- | internal/flamegraph/webserver.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/flamegraph/webserver.go b/internal/flamegraph/webserver.go index 7925011..b1a68e9 100644 --- a/internal/flamegraph/webserver.go +++ b/internal/flamegraph/webserver.go @@ -13,6 +13,11 @@ import ( "time" ) +// ServeSVG starts a small HTTP server that serves a single flamegraph SVG. +// +// It prints a URL of the form http://HOSTNAME:PORT/abs/path/to.svg and blocks until +// the user presses Ctrl+C or the process receives SIGTERM, at which point the server +// is shut down gracefully. func ServeSVG(svgFile string) error { absPath, err := filepath.Abs(svgFile) if err != nil { |
