You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Lunny Xiao 3bdce82ce9
upgrade levelqueue to 0.1.0 (#9192)
5 years ago
..
.drone.yml upgrade levelqueue to 0.1.0 (#9192) 5 years ago
.gitignore upgrade levelqueue to 0.1.0 (#9192) 5 years ago
LICENSE upgrade levelqueue to 0.1.0 (#9192) 5 years ago
README.md upgrade levelqueue to 0.1.0 (#9192) 5 years ago
error.go upgrade levelqueue to 0.1.0 (#9192) 5 years ago
go.mod upgrade levelqueue to 0.1.0 (#9192) 5 years ago
go.sum upgrade levelqueue to 0.1.0 (#9192) 5 years ago
queue.go upgrade levelqueue to 0.1.0 (#9192) 5 years ago

README.md

levelqueue

Level queue is a simple queue golang library base on go-leveldb.

Build Status

Installation

go get gitea.com/lunny/levelqueue

Usage

queue, err := levelqueue.Open("./queue")

err = queue.RPush([]byte("test"))

// pop an element from left of the queue
data, err = queue.LPop()

// if handle success, element will be pop, otherwise it will be keep
queue.LHandle(func(dt []byte) error{
    return nil
})