storj/cmd/statdb
Maximillian von Briesen 36c394c295
StatDB (#144)
* add statdb proto and example client

* server logic

* update readme

* remove boltdb from service.go

* sqlite3

* add statdb server executable file

* create statdb node table if it does not exist already

* get UpdateBatch working

* update based on jt review

* remove some commented lines

* fix linting issues

* reformat

* apiKey -> APIKey

* update statdb client apiKey->APIKey
2018-07-27 17:11:44 -04:00
..
main.go StatDB (#144) 2018-07-27 17:11:44 -04:00
README.md StatDB (#144) 2018-07-27 17:11:44 -04:00

gRPC Server

This is a gRPC server which handles CRUD (create, read, update, delete) requests for storing stats for farmers 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 farmer 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`