modulepackage
0.0.0-20240818183128-8c89544aa046
Repository: https://github.com/ezavada/go-jobqueue.git
Documentation: pkg.go.dev
# README
go-jobqueue
A lightweight, durable, and embedded job queue for Go applications. Powered by BadgerDB.
Warning: this package is a work in progress, use at your own risk.
Features
- Portable alternative to full-fledged message brokers (i.e. RabbitMQ).
- Built on top of BadgerDB for durability
- Automatic job processing with support for multiple concurrent workers.
- Strong type safety using generics.
Installation
go get github.com/argus-labs/go-jobqueue
# Functions
New creates a new JobQueue with the specified database, name, and number of worker goroutines.
No description provided by the author
NewJobQueueDbMongo creates a new JobQueueDbMongo instance.
WithBadgerDB sets the JobQueue to use BadgerDB instead of MongoDB.
WithFetchInterval sets the interval at which the job queue fetches jobs from BadgerDB.
WithInmemDB uses an in-memory BadgerDB instead of a persistent one.
WithJobBufferSize sets the size of the job channel.
how many jobs at once are retrieved from the DB in a single fetch operation.
WithMongoDB sets the JobQueue to use MongoDB instead of BadgerDB.
# Constants
No description provided by the author
No description provided by the author
# Variables
returned by ReadJob or UpdateJob if the job is not found.
# Structs
No description provided by the author
No description provided by the author
JobQueueDbMongo is the MongoDB implementation of the JobQueueDb interface.
No description provided by the author
# Interfaces
JobContext provides context for a job which is injected into the job Process method.
No description provided by the author