An open API service indexing awesome lists of open source software.

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: 3 months ago
JSON representation

Cache on top of badger DB. With GRPC transport

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))
}
```