19 lines
1.0 KiB
Markdown
19 lines
1.0 KiB
Markdown
|
# gRPC Server + BoltDB Crud Interface
|
||
|
|
||
|
This is a gRPC server which handles CRUD (create, read, update, delete) requests for storing file paths and small values to BoltDB.
|
||
|
For example, you can store a value (i.e. "hello world") at `/my/test/file` and interact with `/my/test/file` through an API, backed by BoltDB.
|
||
|
|
||
|
To run the server:
|
||
|
```
|
||
|
go run cmd/netstate-rpc/server/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 Put, Get, List, and Delete methods to create/interact with small values stored in a BoltDB.
|
||
|
An example program utilizing these functions can be found at `storj.io/storj/examples/netstate-client/main.go`.
|
||
|
|
||
|
Afterward, you can also use [Bolter](https://github.com/hasit/bolter) or a similar BoltDB viewer to make sure your files were changed as expected.
|
||
|
|
||
|
If changes are made to `storj.io/storj/protos/netstate/netstate.proto`, the protobuf file will need to be regenerated by running `go generate` inside `protos/netstate`.
|
||
|
|