17 lines
916 B
Markdown
17 lines
916 B
Markdown
|
# 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 generate` inside `pkg/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 generate` inside `pkg/statdb/dbx`
|