Documentation
¶
Overview ¶
Package sqlstore persists scheduled definitions and their occurrences.
Index ¶
- type Store
- func (s *Store) BacklogMetrics(ctx context.Context, tenant string) (int64, time.Time, error)
- func (s *Store) ClaimDue(ctx context.Context, tenant, jobName, owner string, now time.Time, ...) (*scheduler.ScheduleOccurrence, error)
- func (s *Store) Complete(ctx context.Context, occurrence scheduler.ScheduleOccurrence, ...) error
- func (s *Store) Ensure(ctx context.Context) error
- func (s *Store) InspectOpenWork(ctx context.Context, tenant contract.TenantID, module contract.ModuleID, ...) ([]contract.ModuleBlocker, error)
- func (s *Store) MarkOutcomeUnknown(ctx context.Context, occurrence scheduler.ScheduleOccurrence, now time.Time, ...) error
- func (s *Store) NextRunAt(ctx context.Context, tenant, jobName string) (time.Time, error)
- func (s *Store) RegisterDefinition(ctx context.Context, tenant string, job *scheduler.JobConfig, digest string, ...) error
- func (s *Store) Renew(ctx context.Context, occurrence scheduler.ScheduleOccurrence, now time.Time, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) BacklogMetrics ¶
BacklogMetrics returns the count and oldest scheduled time of materialized pending occurrences for one tenant. The composite due index bounds the scan to that tenant's pending schedules; SQL work is admitted by the scheduler.
func (*Store) InspectOpenWork ¶
func (*Store) MarkOutcomeUnknown ¶
func (*Store) NextRunAt ¶
NextRunAt returns the persisted cursor for one scheduled definition. It is a wake-up hint only; ClaimDue remains authoritative about whether work is due.