storj/examples/statdb-client
Maximillian von Briesen 2c36dcc2c8
Update statdb (#650)
* add sdbclient.UpdateUptime; update args for sdbclient.CreateEntryIfNotExists

* add auditcount to node stats; restructure statdb.CreateEntryIfNotExists

* add noop mock sdbclient

* add the ability to create a node in statdb without "default" stats

* update statdb.CreateEntryIfNotExists

* take fewer args for sdbclient.CreateWithStats/FindValidNodes

* add sdbclient.UpdateAuditSuccess

* update sdbclient.Update so that all fields are updated when called (reduce args)

* update error checking in statdb.Create
2018-11-14 19:03:19 -05:00
..
main.go Update statdb (#650) 2018-11-14 19:03:19 -05:00
README.md rename farmers to storagenode (#275) 2018-08-24 21:52:58 -04:00

gRPC Client

This is an example gRPC client which makes requests for updating and storing storagenode 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`