Versions in this module Expand all Collapse all v1 v1.1.0 Sep 5, 2026 v1.0.2 Sep 4, 2026 v1.0.1 Sep 4, 2026 v1.0.0 Sep 3, 2026 Changes in this version + var ErrDiskLow = errors.New("record: not enough free space for a new recording") + var ErrNotRecorded = errors.New("record: session has no recording") + var ErrOutsideRoot = errors.New("record: stored path is outside the recordings root") + func FreeSpace(dir string) (uint64, error) + func NewSessionID() (string, error) + func Usage(dir string) (files int, bytes int64, skipped int, err error) + type Archived interface + ArchivedIDs func(ctx context.Context, ids []string) (map[string]bool, error) + type PruneResult struct + Bytes int64 + Deleted []string + Dirs int + Files int + KeptBytes int64 + KeptUnarchived int + Unknown int + func Prune(ctx context.Context, dir string, keepFor time.Duration, now time.Time, ...) (PruneResult, error) + type Pruner struct + func NewPruner(dir string, keepFor time.Duration, logger *slog.Logger) *Pruner + func (p *Pruner) RunOnce(ctx context.Context) PruneResult + func (p *Pruner) Start(ctx context.Context) + func (p *Pruner) WithArchive(a Archived) *Pruner + func (p *Pruner) WithAuditLog(onDeleted func(context.Context, []string)) *Pruner + func (p *Pruner) WithOpenSessions(open func() map[string]bool) *Pruner + type Store struct + func NewStore(dir string) (*Store, error) + func (s *Store) CheckSpace(minFree uint64) error + func (s *Store) Create(sessionID string) (*os.File, string, error) + func (s *Store) Open(sessionID, storedPath string) (*os.File, error) + func (s *Store) Root() string + type Writer struct + func NewWriter(w io.WriteCloser, width, height int, env map[string]string) (*Writer, error) + func (w *Writer) Close() (err error) + func (w *Writer) Err() error + func (w *Writer) Input(b []byte) error + func (w *Writer) InputStream() io.Writer + func (w *Writer) OnFailure(fn func(error)) + func (w *Writer) Output(b []byte) error + func (w *Writer) OutputStream() io.Writer + func (w *Writer) Resize(cols, rows int) error