summaryrefslogtreecommitdiffstats
path: root/vendor/gitea.com/lunny/levelqueue/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gitea.com/lunny/levelqueue/README.md')
-rw-r--r--vendor/gitea.com/lunny/levelqueue/README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/gitea.com/lunny/levelqueue/README.md b/vendor/gitea.com/lunny/levelqueue/README.md
new file mode 100644
index 0000000000..80a0853cf6
--- /dev/null
+++ b/vendor/gitea.com/lunny/levelqueue/README.md
@@ -0,0 +1,28 @@
+# levelqueue
+
+Level queue is a simple queue golang library base on go-leveldb.
+
+[![Build Status](https://drone.gitea.com/api/badges/lunny/levelqueue/status.svg)](https://drone.gitea.com/lunny/levelqueue) [![](http://gocover.io/_badge/gitea.com/lunny/levelqueue)](http://gocover.io/gitea.com/lunny/levelqueue)
+[![](https://goreportcard.com/badge/gitea.com/lunny/levelqueue)](https://goreportcard.com/report/gitea.com/lunny/levelqueue)
+
+## Installation
+
+```
+go get gitea.com/lunny/levelqueue
+```
+
+## Usage
+
+```Go
+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
+})
+``` \ No newline at end of file