1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-09 17:24:43 +00:00
2019-11-28 23:37:33 +08:00
..
2019-11-28 23:37:33 +08:00
2019-11-28 23:37:33 +08:00
2019-11-28 23:37:33 +08:00
2019-11-28 23:37:33 +08:00
2019-11-28 23:37:33 +08:00
2019-11-28 23:37:33 +08:00
2019-11-28 23:37:33 +08:00
2019-11-28 23:37:33 +08:00

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
})