checkpoint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN            string
	MaxCheckpoints int
}

Config configures the SQLiteStore.

type SQLiteStore

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

SQLiteStore implements crew.CheckpointStore using a SQLite database.

func New

func New(cfg Config) (*SQLiteStore, error)

New creates a new SQLiteStore with the given configuration.

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error

Close closes the database connection.

func (*SQLiteStore) Delete

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

Delete removes a checkpoint by ID.

func (*SQLiteStore) List

func (s *SQLiteStore) List(ctx context.Context, filter map[string]any) ([]*crew.Checkpoint, error)

List returns all checkpoints matching the filter.

func (*SQLiteStore) Load

func (s *SQLiteStore) Load(ctx context.Context, id string) (*crew.Checkpoint, error)

Load retrieves a checkpoint by ID.

func (*SQLiteStore) Save

func (s *SQLiteStore) Save(ctx context.Context, ckpt *crew.Checkpoint) error

Save upserts a checkpoint into the store.

Jump to

Keyboard shortcuts

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