Socket
Book a DemoInstallSign in
Socket

src.techknowlogick.com/work-pebblequeue

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

src.techknowlogick.com/work-pebblequeue

Go Modules
Version
v0.0.0-20251121202254-ae307a5b805a
Version published
Created
Source

work-pebblequeue

An implementation of the Queue interface from github:taylorchu/work for pebble.

Usage

func main() {
    db, err := pebble.Open("pebble_test", &pebble.Options{})
	if err != nil {
		t.Fatal(err)
	}
	defer db.Close()
    queue := work.NewPebbleQueue(db)

	job := work.NewJob()
	type message struct {
		Text string
	}

	job := work.NewJob()
	err = job.MarshalPayload(message{Text: "hello"})
    if err != nil {
        log.Fatalln(err)
    }
	err = queue.Enqueue(job, &work.EnqueueOptions{
		Namespace: "{ns1}",
		QueueID:   "cmd_queue",
	})
	if err != nil {
		log.Fatalln(err)
	}
}

Caveats

Don't use multiple proccesses to connect to the same databese. Pebble is not designed for that. If you need to use multiple processes, use a different database. In the case of using this package, it is expected that the producer and consumer are sharing the same pebble "connection", and are goroutines in the same procecss.

License

This project is a largely based on the existing redis queue implementation in work, which is licensed under the MIT license, so this project is also licensed under the MIT license to ensure compliance. A very big thank you to Taylor Chu for their work (no pun intended) on work.

You can see work, and it's documentation here: https://github.com/taylorchu/work

FAQs

Package last updated on 21 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts