Documentation
¶
Overview ¶
Package sqlitestore implements workflowkit.Store with SQLite persistence.
Scalar workflow fields are stored as columns. Completed steps, step attempts, step records, and metadata are stored as JSON fields so the Store contract can persist the full workflow state while keeping payload storage host-owned.
Index ¶
- Constants
- type Store
- func (s *Store) ClaimRunnable(ctx context.Context, workerID string, lease time.Duration) (workflowkit.WorkflowRun, error)
- func (s *Store) Close() error
- func (s *Store) ExtendLease(ctx context.Context, id string, workerID string, lease time.Duration) (workflowkit.WorkflowRun, error)
- func (s *Store) Get(ctx context.Context, id string) (workflowkit.WorkflowRun, error)
- func (s *Store) ListWorkflows(ctx context.Context, query workflowkit.WorkflowQuery) ([]workflowkit.WorkflowRun, error)
- func (s *Store) ReleaseLease(ctx context.Context, id string, workerID string) (workflowkit.WorkflowRun, error)
- func (s *Store) Save(ctx context.Context, run workflowkit.WorkflowRun) error
- func (s *Store) Update(ctx context.Context, id string, ...) (workflowkit.WorkflowRun, error)
Constants ¶
View Source
const SchemaVersion = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ClaimRunnable ¶
func (s *Store) ClaimRunnable(ctx context.Context, workerID string, lease time.Duration) (workflowkit.WorkflowRun, error)
func (*Store) ExtendLease ¶
func (s *Store) ExtendLease(ctx context.Context, id string, workerID string, lease time.Duration) (workflowkit.WorkflowRun, error)
func (*Store) Get ¶
func (s *Store) Get(ctx context.Context, id string) (workflowkit.WorkflowRun, error)
func (*Store) ListWorkflows ¶
func (s *Store) ListWorkflows(ctx context.Context, query workflowkit.WorkflowQuery) ([]workflowkit.WorkflowRun, error)
func (*Store) ReleaseLease ¶
func (s *Store) ReleaseLease(ctx context.Context, id string, workerID string) (workflowkit.WorkflowRun, error)
func (*Store) Save ¶
func (s *Store) Save(ctx context.Context, run workflowkit.WorkflowRun) error
func (*Store) Update ¶
func (s *Store) Update(ctx context.Context, id string, mutate func(workflowkit.WorkflowRun) (workflowkit.WorkflowRun, error)) (workflowkit.WorkflowRun, error)
Click to show internal directories.
Click to hide internal directories.