b6b6111173
* protos: move streams to pb * protos: move overlay to pb * protos: move pointerdb to pb * protos: move piecestore to pb * fix statdb import naming
17 lines
816 B
Markdown
17 lines
816 B
Markdown
# gRPC Client + BoltDB Crud Interface
|
|
|
|
This is an example gRPC client which makes CRUD requests (create, read, update, delete) for storing pointers at given paths in BoltDB.
|
|
|
|
The gRPC server at `storj.io/storj/cmd/pointerdb/main.go` needs to be running for this to work.
|
|
|
|
To run the client:
|
|
```
|
|
go run examples/pointerdb-client/main.go
|
|
```
|
|
You can change the port number with a flag if necessary: `-port=<port-number>`
|
|
|
|
Afterward, you can use [Bolter](https://github.com/hasit/bolter) or a similar BoltDB viewer to make sure your pointer entries were changed as expected.
|
|
|
|
If changes are made to `storj.io/storj/pkg/pb/pointerdb.proto`, the protobuf file will need to be regenerated by running `go generate` inside `pkg/pb`.
|
|
|
|
Tests for this example code can be found in `storj.io/storj/pkg/pointerdb/client_test.go`. |