MCPcopy Index your code
hub / github.com/didil/goblero

github.com/didil/goblero @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
86 symbols 322 edges 9 files 42 documented · 49% updated 3d agov0.3.0 · 2026-07-05★ 1675 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Goblero

Pure Go, Simple, Embedded, Persistent Job Queue, backed by BadgerDB

Build Status Coverage Status goreportcard codebeat badge Documentation

DO NOT USE IN PRODUCTION This library is still in Alpha / Work In Progress

About Goblero

Intro article: Introducing Goblero: a Go Embedded Job Queue - Pure Go library, no cgo - Simple, embedded, persistent job queue - Provides in-process job processing to any Go app - The jobs/status changes are persisted to disk after each operation and pending jobs can continue processing after an app restart or a crash - Allows multiple "processors", each processor/worker processes one job at a time then is assigned a new job, etc - The storage engine used is BadgerDB

P.S: Why is the library named Goblero ? Go for the Go programming language obviously, and Badger in french is "Blaireau", but blero is easier to pronounce :)

Usage

The full API is documented on godoc.org. There is also a demo repo goblero-demo

Get package

go get -u github.com/didil/goblero/pkg/blero

API

// Create a new Blero backend
bl := blero.New("db/")

// Start Blero
bl.Start()

// defer Stopping Blero
defer bl.Stop()

// register a processor
bl.RegisterProcessorFunc(func(j *blero.Job) error {
  // Do some processing, access job name with j.Name, job data with j.Data
})

// enqueue a job
bl.EnqueueJob("MyJob", []byte("My Job Data"))

Benchmarks

# Core i5 laptop / 8GB Ram / SSD 
make bench
BenchmarkEnqueue/EnqueueJob-4          50000            159942 ns/op (~ 6250 ops/s)
BenchmarkEnqueue/dequeueJob-4           5000           2767260 ns/op (~  361 ops/s)

Todo:

  • Restart interrupted jobs after app restart/crashes
  • Sweep completed jobs from the "complete" queue
  • Failed Jobs retry options
  • Allow batch enqueuing
  • Add support for Go contexts
  • Test in real conditions under high load
  • Expose Prometheus Metrics in an Http handler
  • Optimize performance / Locking

Contributing

All contributions (PR, feedback, bug reports, ideas, etc.) are welcome !

Extension points exported contracts — how you extend this code

Processor (Interface)
Processor interface [2 implementers]
pkg/blero/processing.go
ProcessorFunc (FuncType)
ProcessorFunc is a processor function
pkg/blero/processing.go

Core symbols most depended-on inside this repo

EnqueueJob
called by 19
pkg/blero/backend.go
New
called by 14
pkg/blero/backend.go
Stop
called by 12
pkg/blero/backend.go
jIDString
called by 12
pkg/blero/queue.go
Start
called by 11
pkg/blero/backend.go
dequeueJob
called by 7
pkg/blero/queue.go
markJobDone
called by 6
pkg/blero/queue.go
RegisterProcessor
called by 5
pkg/blero/backend.go

Shape

Method 39
Function 34
Struct 10
FuncType 1
Interface 1
TypeAlias 1

Languages

Go100%

Modules by API surface

pkg/blero/queue.go24 symbols
pkg/blero/processing.go14 symbols
pkg/blero/dispatch_test.go13 symbols
pkg/blero/dispatch.go12 symbols
pkg/blero/queue_test.go10 symbols
pkg/blero/backend.go8 symbols
pkg/blero/backend_test.go3 symbols
pkg/blero/jobstatus_string_test.go1 symbols
pkg/blero/jobstatus_string.go1 symbols

For agents

$ claude mcp add goblero \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page