Documentation
¶
Index ¶
- type SQLiteStore
- func (s *SQLiteStore) BatchClaimTasks(workerID string, limit int) ([]*task.Task, error)
- func (s *SQLiteStore) BatchSaveTasks(tasks []*task.Task) error
- func (s *SQLiteStore) ClaimTask(workerID string) (*task.Task, error)
- func (s *SQLiteStore) Cleanup(completedRetention, failedRetention time.Duration) error
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) CompleteTask(id string) error
- func (s *SQLiteStore) FailTask(id string, errMsg string) error
- func (s *SQLiteStore) GetStats() (*storage.Stats, error)
- func (s *SQLiteStore) GetTask(id string) (*task.Task, error)
- func (s *SQLiteStore) GetTaskHistory(taskID string) ([]*storage.HistoryEntry, error)
- func (s *SQLiteStore) GetTasks(filter storage.TaskFilter) ([]*task.Task, error)
- func (s *SQLiteStore) Ping() error
- func (s *SQLiteStore) RecordHistory(taskID, event, message string) error
- func (s *SQLiteStore) SaveTask(t *task.Task) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func New ¶
func New(dsn string) (*SQLiteStore, error)
func (*SQLiteStore) BatchClaimTasks ¶
BatchClaimTasks claims multiple tasks at once
func (*SQLiteStore) BatchSaveTasks ¶
func (s *SQLiteStore) BatchSaveTasks(tasks []*task.Task) error
BatchSaveTasks saves multiple tasks in a single transaction
func (*SQLiteStore) ClaimTask ¶
func (s *SQLiteStore) ClaimTask(workerID string) (*task.Task, error)
ClaimTask claims a single task for processing
func (*SQLiteStore) Cleanup ¶
func (s *SQLiteStore) Cleanup(completedRetention, failedRetention time.Duration) error
Cleanup removes old completed and failed tasks
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
Close closes the database connection
func (*SQLiteStore) CompleteTask ¶
func (s *SQLiteStore) CompleteTask(id string) error
CompleteTask marks a task as completed
func (*SQLiteStore) FailTask ¶
func (s *SQLiteStore) FailTask(id string, errMsg string) error
FailTask marks a task as failed and handles retries
func (*SQLiteStore) GetStats ¶
func (s *SQLiteStore) GetStats() (*storage.Stats, error)
GetStats returns statistics about tasks
func (*SQLiteStore) GetTask ¶
func (s *SQLiteStore) GetTask(id string) (*task.Task, error)
GetTask retrieves a single task by ID
func (*SQLiteStore) GetTaskHistory ¶
func (s *SQLiteStore) GetTaskHistory(taskID string) ([]*storage.HistoryEntry, error)
GetTaskHistory retrieves the history of a task
func (*SQLiteStore) GetTasks ¶
func (s *SQLiteStore) GetTasks(filter storage.TaskFilter) ([]*task.Task, error)
GetTasks retrieves tasks with filtering
func (*SQLiteStore) RecordHistory ¶
func (s *SQLiteStore) RecordHistory(taskID, event, message string) error
RecordHistory records an event in task history
Click to show internal directories.
Click to hide internal directories.