Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a high-level Queue using the SQLite SQL backend. @group Constructors
Example: sqlite shorthand constructor
q, err := sqlitequeue.New(
"file:queue.db?_busy_timeout=5000",
queue.WithWorkers(4), // optional; default: 1 worker
)
if err != nil {
return
}
_ = q
func NewWithConfig ¶
NewWithConfig creates a high-level Queue using an explicit SQLite SQL driver config. @group Constructors
Example: sqlite config constructor
q, err := sqlitequeue.NewWithConfig(
sqlitequeue.Config{
DriverBaseConfig: queueconfig.DriverBaseConfig{
DefaultQueue: "critical", // default if empty: "default"
Observer: nil, // default: nil
},
DB: nil, // optional; provide *sql.DB instead of DSN
DSN: "file:queue.db?_busy_timeout=5000", // optional if DB is set
ProcessingRecoveryGrace: 2 * time.Second, // default if <=0: 2s
ProcessingLeaseNoTimeout: 5 * time.Minute, // default if <=0: 5m
},
queue.WithWorkers(4), // optional; default: 1 worker
)
if err != nil {
return
}
_ = q
Types ¶
Click to show internal directories.
Click to hide internal directories.