Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhuda committed Sep 19, 2021
1 parent d7a5fe8 commit 7d25a3f
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
## Description
# Description

[DiskV](https://github.com/peterbourgon/diskv) wrapper using versioning method.
[Diskv](https://github.com/peterbourgon/diskv) wrapper using versioning method.

> [DiskV](https://github.com/peterbourgon/diskv) is simple, persistent key-value store written in the Go language.

# Installing

Install
```bash
$ go get github.com/mkhuda/diskv_wrapper
```


# Usage

```go
package main

import (
"fmt"
"github.com/peterbourgon/diskv"
"github.com/mkhuda/diskv_wrapper"
)

func main() {
disk := diskv.New(diskv.Options{
BasePath: basePath,
AdvancedTransform: diskv_wrapper.AdvanceTransform,
InverseTransform: diskv_wrapper.InverseTransform,
CacheSizeMax: 1024 * 1024,
})

diskv_wrapper.WriteVersion(disk, "v1")

path := strings.Join([]string{"v1", "key"}, "/")

diskv_wrapper.Write(disk, path, "testdata")
}
```
# Credits

Diskv Creator: [Peter Bourgon](https://github.com/peterbourgon)

0 comments on commit 7d25a3f

Please sign in to comment.