From 729e63e1d9a04cbe6811657f2e4304eeef72cde8 Mon Sep 17 00:00:00 2001 From: qichengzx Date: Sun, 12 Dec 2021 11:09:53 +0800 Subject: [PATCH] add readme --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c73fd04 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +Bitcask +---- + +Bitcask is a log-structured fast KV store. + +This project is an implementation of Bitcask written in Go. + +[Bitcask intro here](https://riak.com/assets/bitcask-intro.pdf) + +## Example + +```go +package main + +import ( + "github.com/qichengzx/bitcask" + "log" +) + +func main() { + d, err := bitcask.New("your/path/here") + if err != nil { + log.Fatal(err) + } + defer d.Close() + + d.Put([]byte("bitcask"), []byte("bitcask is a log-structured fast KV store")) + v, _ := d.Get([]byte("bitcask")) + log.Println(string(v)) +} +``` \ No newline at end of file