Versions in this module Expand all Collapse all v0 v0.0.2 Oct 6, 2026 Changes in this version + func Migrate(ctx context.Context, db *sql.DB) error + type Storage struct + Retention time.Duration + func Open(ctx context.Context, dsn string) (*Storage, error) + func (s *Storage) AdvanceSchedule(ctx context.Context, id string, lastRun, nextRun time.Time) error + func (s *Storage) Close() error + func (s *Storage) Counts(ctx context.Context) (jobsync.Counts, error) + func (s *Storage) Delete(ctx context.Context, ids []string) error + func (s *Storage) DueSchedules(ctx context.Context, now time.Time) ([]jobsync.Schedule, error) + func (s *Storage) Enqueue(ctx context.Context, jobs []*jobsync.Job) error + func (s *Storage) EnqueueTx(ctx context.Context, tx jobsync.Tx, jobs []*jobsync.Job) error + func (s *Storage) Extend(ctx context.Context, ids []string, owner string, lease time.Duration) error + func (s *Storage) Fetch(ctx context.Context, queues []string, n int, owner string, lease time.Duration) ([]*jobsync.Job, error) + func (s *Storage) Finish(ctx context.Context, id, owner string, r jobsync.Result) error + func (s *Storage) Heartbeat(ctx context.Context, info jobsync.ServerInfo, ttl time.Duration) error + func (s *Storage) Janitor(ctx context.Context, every time.Duration) error + func (s *Storage) JobHistory(ctx context.Context, id string) (*jobsync.Job, []jobsync.Transition, error) + func (s *Storage) ListJobs(ctx context.Context, f jobsync.Filter) ([]*jobsync.Job, int64, error) + func (s *Storage) ListSchedules(ctx context.Context) ([]jobsync.Schedule, error) + func (s *Storage) Lock(ctx context.Context, key string, ttl time.Duration) (string, error) + func (s *Storage) PauseQueue(ctx context.Context, name string) error + func (s *Storage) PausedQueues(ctx context.Context) ([]string, error) + func (s *Storage) QueueStats(ctx context.Context) ([]jobsync.QueueStat, error) + func (s *Storage) Reclaim(ctx context.Context) (int, error) + func (s *Storage) RemoveSchedule(ctx context.Context, id string) error + func (s *Storage) Requeue(ctx context.Context, ids []string) error + func (s *Storage) ResumeQueue(ctx context.Context, name string) error + func (s *Storage) SaveSchedule(ctx context.Context, sc jobsync.Schedule) error + func (s *Storage) Servers(ctx context.Context) ([]jobsync.ServerInfo, error) + func (s *Storage) SetSchedulePaused(ctx context.Context, id string, paused bool) error + func (s *Storage) Throughput(ctx context.Context, since time.Time, bucket time.Duration) ([]jobsync.Bucket, error) + func (s *Storage) Truncate(ctx context.Context) error + func (s *Storage) Unlock(ctx context.Context, key, token string) error v0.0.1 Oct 6, 2026