sqlite

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package sqlite provides optional SQLite persistence for webpprof captures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage persists a webpprof event window in a SQLite database.

func Open

func Open(ctx context.Context, path string) (*Storage, error)

Open initializes an owner-only SQLite database at path.

func (*Storage) Clear

func (s *Storage) Clear(ctx context.Context, nextCursor uint64) error

Clear removes all entries while preserving the monotonic cursor.

func (*Storage) Close

func (s *Storage) Close() error

Close releases the SQLite connection.

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, id string) error

Delete removes one retained entry.

func (*Storage) Load

func (s *Storage) Load(ctx context.Context) ([]webpprof.Entry, uint64, error)

Load restores entries and the last assigned cursor.

func (*Storage) Name

func (*Storage) Name() string

Name identifies this backend in webpprof storage statistics.

func (*Storage) Put

func (s *Storage) Put(ctx context.Context, entry webpprof.Entry, nextCursor uint64) error

Put inserts or updates one entry and persists the monotonic cursor.

Jump to

Keyboard shortcuts

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