-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
50 lines (38 loc) · 1.3 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Persival - persisten key value store in Go
==========================================
Persival is an in-memory pseudo key-value storage, very efficient to
keep list of records with small amount of data, when there's no need
of searching for the values nor keys.
Philosophy
----------
Persival follows those simple rules:
* No user-defined keys are allowed, system MUST decide under what key the
value will be stored.
* All the data SHALL always be kept in the memory.
* Persistency SHALL be provided only via logging.
* Activity log SHOULD be merged after it reaches certain size.
* Search for the values CAN NOT be performed.
Storage implementation
----------------------
So far it's only proof of concept, so all the data is stored as a gob
encoded stream.
Installation
------------
Use the `go install` tool:
$ go install github.com/nu7hatch/persival
Usage
-----
package main
import "github.com/nu7hatch/persival"
func main() {
bucket, _ := persival.NewBucket("./mybucket.bkt", 0)
k1, _ := bucket.Set("hello")
k2, _ := bucket.Set("world")
bucket.Update(k2, "hurra")
bucket.Delete(k1)
bucket.Close()
}
Copyright
---------
Copyright (C) 2011 by Krzysztof Kowalik <[email protected]>
Released under the MIT license. See COPYING file for details.