Skip to content

Commit

Permalink
chore: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-karan committed Dec 18, 2022
1 parent e0d49b4 commit ef8e89d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ jobs:
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
_A disk based key-value store based on [Bitcask](https://en.wikipedia.org/wiki/Bitcask)_.

[![Go Reference](https://pkg.go.dev/badge/github.com/mr-karan/barreldb.svg)](https://pkg.go.dev/github.com/mr-karan/barreldb)
[![Go Report Card](https://goreportcard.com/badge/mr-karan/barreldb)](https://goreportcard.com/report/mr-karan/barreldb)
[![GitHub Actions](https://github.com/mr-karan/barreldb/actions/workflows/build.yml/badge.svg)](https://github.com/mr-karan/barreldb/actions/workflows/build.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/mr-karan/barreldb)](https://goreportcard.com/report/github.com/mr-karan/barreldb)
[![GitHub Actions](https://github.com/mr-karan/barreldb/actions/workflows/release.yml/badge.svg)](https://github.com/mr-karan/barreldb/actions/workflows/release.yml)

---

Expand Down Expand Up @@ -77,6 +77,21 @@ OK
ERR: invalid key: key is already expired
```

## API

| Method | Description |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `Init(...cfg) *Barrel` | Returns a new instance of `Barrel`. Additional options can be passed like `WithDir`, `WithReadOnly` etc. |
| `Put(string, []byte) error` | Store a key and value in the datastore. |
| `PutEx(string, []byte, time.Duration) error` | Store a key and value with expiry in the datastore. |
| `Get(string) []byte,error` | Retrieve a value by key from the datastore. |
| `Delete(string) error` | Delete a key from the datastore. |
| `Keys() []string` | List all keys in the datastore. |
| `Len() int` | Return the total count of keys in the datastore. |
| `Fold(func(string) error) error` | Fold over all K/V pairs in a Bitcask datastore. Calls a function on each key inside the datastore. |
| `Sync() error` | Force any writes to sync to disk. |
| `Shutdown() error` | Close a data store and flush all pending writes. Removes any lock on the data directory as well. |

## Benchmarks

Using `make bench`:
Expand Down

0 comments on commit ef8e89d

Please sign in to comment.