Help us shape the future of Go! Take the 2026 Go Developer Survey

session

command
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Example: the interactive Session loop, headless.

output.Session drives a Source (here a *ggplot.Plot) onto a LiveSurface, running the build → draw → event loop and the fast-path / slow-path policy:

  • fast path (ActionRedraw): re-render the current figure with updated data-space viewport (pan/zoom via Zoomable) — no rebuild.
  • slow path (ActionRebuild): call Source.Build again when an interaction crosses the trained data extent (scales retrain, stats recompute). WithRebuildDelay makes this asynchronous and debounced.

output/window wires this same Session policy to a real GPU window (see examples/window). Here we use a headless LiveSurface that scripts a sequence of events and writes each committed frame to a PNG, so the loop is fully runnable without a display:

go run ./examples/session

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL