postgres

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCheckpointHistoryTable = "agentflow_run_checkpoint_history"
View Source
const DefaultTableName = "agentflow_run_snapshots"

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckpointHistory added in v0.2.0

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

func NewCheckpointHistory added in v0.2.0

func NewCheckpointHistory(db *sql.DB, opts ...CheckpointHistoryOption) (*CheckpointHistory, error)

func (*CheckpointHistory) Append added in v0.2.0

func (h *CheckpointHistory) Append(ctx context.Context, snapshot runstate.RunSnapshot) error

func (*CheckpointHistory) List added in v0.2.0

func (h *CheckpointHistory) List(ctx context.Context, runID string, limit int) ([]runstate.CheckpointSummary, error)

func (*CheckpointHistory) Load added in v0.2.0

func (h *CheckpointHistory) Load(ctx context.Context, runID string, version int64) (runstate.RunSnapshot, error)

type CheckpointHistoryOption added in v0.2.0

type CheckpointHistoryOption func(*CheckpointHistory) error

func WithCheckpointHistoryTable added in v0.2.0

func WithCheckpointHistoryTable(name string) CheckpointHistoryOption

type Option

type Option func(*Repository) error

func WithTableName

func WithTableName(name string) Option

type Repository

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

func NewRepository

func NewRepository(db *sql.DB, opts ...Option) (*Repository, error)

func (*Repository) Delete

func (r *Repository) Delete(ctx context.Context, runID string) error

func (*Repository) List added in v0.1.1

func (*Repository) Load

func (r *Repository) Load(ctx context.Context, runID string) (runstate.RunSnapshot, error)

func (*Repository) Save

func (r *Repository) Save(ctx context.Context, snapshot *runstate.RunSnapshot, expectedVersion int64) error

Jump to

Keyboard shortcuts

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