https://github.com/threeaccents/pebble
Cache on top of badger DB. With GRPC transport
https://github.com/threeaccents/pebble
badger cache grpc grpc-go
Last synced: about 1 year ago
JSON representation
Cache on top of badger DB. With GRPC transport
- Host: GitHub
- URL: https://github.com/threeaccents/pebble
- Owner: threeaccents
- Created: 2020-04-17T22:17:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-21T20:41:29.000Z (almost 6 years ago)
- Last Synced: 2025-02-24T11:50:39.566Z (about 1 year ago)
- Topics: badger, cache, grpc, grpc-go
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pebble (Not For Use)
GRPC based cache with a customizable backend. Default is badgerDB.
###Run
```bash
./cache --db-dir="path/to/db" --port=":5555"
```
###Example
```go
package main
import (
"context"
"fmt"
"github.com/oriiolabs/pebble/api"
)
func main() {
ctx := context.Background()
c, err := api.NewClient(":4200", nil)
if err != nil {
panic(err)
}
if err := c.Set(ctx, "hello", []byte("world")); err != nil {
panic(err)
}
value, err := c.Get(ctx, "hello")
if err != nil {
panic(err)
}
fmt.Printf("value: %s\n", string(value))
}
```