storj/examples/statdb-client
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 Client

This is an example gRPC client which makes requests for updating and storing farmer stats in a relational database.

The gRPC server at storj.io/storj/cmd/statdb/main.go needs to be running for this to work.

To run the client:

go run examples/statdb-client/main.go

You can change the port number with a flag if necessary: -port=<port-number>

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`