checkpoint

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("checkpoint: not found")

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID        string
	SessionID string
	Remaining *pipeline.Step
	Input     pipeline.Input
	Result    pipeline.Result
	CreatedAt time.Time
}

Entry captures the resumable state after a pipeline interruption.

type FileStore

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

FileStore persists checkpoint entries as JSON on disk.

func NewFileStore

func NewFileStore(path string) (*FileStore, error)

func (*FileStore) Delete

func (f *FileStore) Delete(_ context.Context, id string) error

func (*FileStore) Load

func (f *FileStore) Load(_ context.Context, id string) (Entry, error)

func (*FileStore) Save

func (f *FileStore) Save(_ context.Context, entry Entry) (string, error)

type MemoryStore

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

MemoryStore keeps checkpoint state in memory for the lifetime of the runtime.

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) Delete

func (m *MemoryStore) Delete(_ context.Context, id string) error

func (*MemoryStore) Load

func (m *MemoryStore) Load(_ context.Context, id string) (Entry, error)

func (*MemoryStore) Save

func (m *MemoryStore) Save(_ context.Context, entry Entry) (string, error)

type Store

type Store interface {
	Save(context.Context, Entry) (string, error)
	Load(context.Context, string) (Entry, error)
	Delete(context.Context, string) error
}

Store persists resumable checkpoint state for pipeline-backed runs.

Jump to

Keyboard shortcuts

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