storj/examples/pointerdb-client
Kaloyan Raev daf391e473
Refactor List in PointerDB (#163)
* Refactor List in Pointer DB

* Fix pointerdb-client example

* Fix issue in Path type related to empty paths

* Test for the PointerDB service with some fixes

* Fixed debug message in example: trancated --> more

* GoDoc comments for unexported methods

* TODO comment to check if Put is overwriting

* Log warning if protobuf timestamp cannot be converted

* TODO comment to make ListPageLimit configurable

* Rename 'segment' package to 'segments' to reflect folder name
2018-07-27 09:02:59 +03:00
..
main.go Refactor List in PointerDB (#163) 2018-07-27 09:02:59 +03:00
README.md rename netstate to pointerdb (#127) 2018-07-06 15:43:53 -04:00

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 or a similar BoltDB viewer to make sure your pointer entries were changed as expected.

If changes are made to storj.io/storj/protos/pointerdb/pointerdb.proto, the protobuf file will need to be regenerated by running go generate inside protos/pointerdb.

Tests for this example code can be found in storj.io/storj/pkg/pointerdb/client_test.go.