Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
work
✓ github.com/gocraft/work
Create and start a worker pool for processing background jobs.
package main
import (
"fmt"
"github.com/gocraft/work"
"github.com/gomodule/redigo/redis"
)
func main() {
pool := &redis.Pool{MaxActive: 5, MaxIdle: 5, Dial: func() (redis.Conn, error) {
return redis.Dial("tcp", ":6379")
}}
w := work.NewWorkerPool(struct{}{}, 10, "my_app", pool)
w.Start()
fmt.Println("Worker pool started")
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.5.1latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.