15960d4269
* WIP creating admin node service - WIP changing the process pkg to accept multiple services - WIP looping over services passed to process - add netstate/service.go file and abstract it for service processing * implement goroutine to launch each process * goroutines working with multiple services * code review fixes * more code updates for review * Add pkg lock and mod files back in * code review updates * update process.Main with better concurrent error handling * Update error handling and pass ctx to StartService * Update error handling with channel implementation * Merge in upstream changes - Simplify error handling channels * updates * Updates per reviewable * fix test * Setup test exec * Scaffold test setup * process main test working * update admin process test * Test multiple processes done * Add error classes for testing, test main logger error * Updates to tests * Update how process.Main() handles configs * Complete merge * Update Gopkg and add Copyright * Fix cyclical import issue - Added .coverprofile to gitignore - Update admin main.go function call * remove unnecessary line * Updates * DRY up cmd/netstate package * update service function calls * updates * Trying no-ops in examples * rename netstate to pointerdb * trying to fix merge * dep ensure and run tests * remove flag.Parse * Update deps * Skip offending test in pkg/process, to be fixed later |
||
---|---|---|
.. | ||
main.go | ||
README.md |
gRPC Server + BoltDB Crud Interface
This is a gRPC server which handles CRUD (create, read, update, delete) requests for storing pointers at given paths in BoltDB. An example Put Request to store a path and pointer would look like this:
pr := proto.PutRequest{
Path: []byte("here's/a/pointer/path"),
Pointer: &proto.Pointer{
Type: proto.Pointer_INLINE,
Encryption: &proto.EncryptionScheme{
EncryptedEncryptionKey: []byte("key"),
EncryptedStartingNonce: []byte("nonce"),
},
InlineSegment: []byte("littledata"),
},
}
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 Put, Get, List, and Delete methods to create and interact with pointer entries stored in BoltDB.
An example program utilizing these functions can be found at storj.io/storj/examples/pointerdb-client/main.go
.
Afterward, you can also use Bolter or a similar BoltDB viewer to make sure your files were changed as expected.
If changes are made to storj.io/storj/protos/pointerdb/pointerdb.proto
, the protobuf file will need to be regenerated by running go generate
inside protos/pointerdb
.