storj/cmd/statdb/README.md
aligeti 09da23737a
rename farmers to storagenode (#275)
* rename farmers to storagenode

* review changes

* merge conflicts
2018-08-24 21:52:58 -04:00

926 B

gRPC Server

This is a gRPC server which handles CRUD (create, read, update, delete) requests for storing stats for storagenodes in a relational database

To run the server:

go run cmd/pointerdb/main.go

You can also run using these flags: -port=<port-number> -prod=<bool> -db=<db-name>

You can then write a client program using the client library to access the Create, Get, Update, and UpdateBatch methods to create and interact with storagenode stat entries stored in the DB. An example program utilizing these functions can be found at storj.io/storj/examples/statdb-client/main.go.

If changes are made to storj.io/storj/pkg/statdb/proto/statdb.proto, the protobuf file will need to be regenerated by running go generateinsidepkg/statdb/proto`

If changes are made to storj.io/storj/pkg/statdb/dbx/statdb.dbx, the dbx files will need to be regenerated by running go generateinsidepkg/statdb/dbx`