Documentation
¶
Overview ¶
Package sqlstore defines the durable state model and dialect-specific SQL used by the portable SQL job adapter. Backend runtimes own their database clients, while this package keeps queue semantics consistent.
Index ¶
- func ClaimSelection(dialect Dialect) (string, error)
- func ClaimSelectionForQueue(dialect Dialect, placeholder string) (string, error)
- func Schema(dialect Dialect) ([]string, error)
- type Dialect
- type Record
- func (record *Record) Acknowledge(workerID string) error
- func (record *Record) Claim(workerID string, now time.Time) error
- func (record *Record) Fail(workerID, message string, retryAt, now time.Time) (bool, error)
- func (record *Record) Release(now time.Time) bool
- func (record Record) Stale(cutoff time.Time) bool
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaimSelection ¶
func ClaimSelectionForQueue ¶
ClaimSelectionForQueue returns the atomic claim selection restricted to one queue. The backend supplies the placeholder because SQL drivers differ.
Types ¶
type Record ¶
type Record struct {
ID string
Queue string
JobName string
Payload string
PayloadVersion int
Priority int
RunAt time.Time
State State
Attempts int
MaximumAttempts int
ClaimedBy string
ClaimedAt *time.Time
LastError string
CreatedAt time.Time
UpdatedAt time.Time
}
func (*Record) Acknowledge ¶
Click to show internal directories.
Click to hide internal directories.