Documentation
¶
Index ¶
- Constants
- type CheckpointHistory
- func (h *CheckpointHistory) Append(ctx context.Context, snapshot runstate.RunSnapshot) error
- func (h *CheckpointHistory) List(ctx context.Context, runID string, limit int) ([]runstate.CheckpointSummary, error)
- func (h *CheckpointHistory) Load(ctx context.Context, runID string, version int64) (runstate.RunSnapshot, error)
- type CheckpointHistoryOption
- type Option
- type Repository
- func (r *Repository) Delete(ctx context.Context, runID string) error
- func (r *Repository) List(ctx context.Context, filter runstate.ListFilter) ([]runstate.RunSnapshot, error)
- func (r *Repository) Load(ctx context.Context, runID string) (runstate.RunSnapshot, error)
- func (r *Repository) Save(ctx context.Context, snapshot *runstate.RunSnapshot, expectedVersion int64) error
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 Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sql.DB, opts ...Option) (*Repository, error)
func (*Repository) List ¶ added in v0.1.1
func (r *Repository) List(ctx context.Context, filter runstate.ListFilter) ([]runstate.RunSnapshot, error)
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
Click to show internal directories.
Click to hide internal directories.