Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add New Storage Plugin Framework Still a work in progress. Related to issue #422. Leverages Hashicorp's go-plugin. New set of protos for the use of plugin maintainers. Missing tests. Still need to create a plugin binary for the memory backend. Signed-off-by: Olivier Boucher <[email protected]> Added Memory GRPC Plugin. Renamed packages (#422) Renamed packages from "external" to "grpc". Changed storage type to "grpc-plugin". Added cmd/memory-grpc-plugin that uses the memory backend as a grpc plugin. Added go-plugin dependency to Glide. Added task to generate plugin protos to Makefile. Signed-off-by: Olivier Boucher <[email protected]> Refactored gRPC storage plugin protos Now makes use of protos from model/proto/model.proto and removed mapping functions. Plugin invoker calls the plugin binary directly instead of relying on sh. Signed-off-by: Olivier Boucher <[email protected]> Refactored gRPC plugin protos to use defined models Removed mapping code. Removed used of sh, calling plugin binary directly. Signed-off-by: Olivier Boucher <[email protected]> Removed .editorconfig file Signed-off-by: Olivier Boucher <[email protected]> Added support for gRPC plugin configuration Configuration file is passed down to the plugin through the --config argument. It is the plugin's responsability to parse the file and initialize itself. Signed-off-by: Olivier Boucher <[email protected]> Added benchmark for noop SpanWriter vs gRPC based noop plugin Fixed issues related to proto changes. Deleted memory-grpc-plugin since it was no longer relevant. Signed-off-by: Olivier Boucher <[email protected]> Updated gRPC plugin & protos to implement latest SpanReader Added dependencies to Gopkg.lock since Glide -> dep transition happened recently. Signed-off-by: Olivier Boucher <[email protected]> Fixed proto generation introduced when switching to Dep Changed json tags to match when TraceID was not a proto. Signed-off-by: Olivier Boucher <[email protected]> proto fix Fixed issue introduced moving TraceID to model.proto Added proper annotations to storage.proto instead of exposing TraceID in model.proto. Tests are back to green. Signed-off-by: Olivier Boucher <[email protected]> Added tests for gRPC storage factory and options Moved DependencyLink to model.proto since it had to be used and the existing struct did not implement any Marshaler/Unmarshaler methods. Changed storage configuration to allow testing via mocks. Added DependencyReader interface to the StoragePlugin interface. Signed-off-by: Olivier Boucher <[email protected]> * Remove old generated storage file Signed-off-by: Charles Dixon <[email protected]> * Update plugin grpc interface/implementation Signed-off-by: Charles Dixon <[email protected]> * Fix gosec by adding an exclude comment Signed-off-by: Charles Dixon <[email protected]> * Run make fmt Signed-off-by: Charles Dixon <[email protected]> * Add comments to uncommented functions Signed-off-by: Charles Dixon <[email protected]> * Split grpc server and client into separate files Signed-off-by: Charles Dixon <[email protected]> * Use errors.wrap rather than fmt for errors Signed-off-by: Charles Dixon <[email protected]> * Remove unused plugin file Signed-off-by: Charles Dixon <[email protected]> * Add copyright header to grpc server file Signed-off-by: Charles Dixon <[email protected]> * Update headers to updated license on uncommitted files Signed-off-by: Charles Dixon <[email protected]> * Move grpc config to plugin/storage Signed-off-by: Charles Dixon <[email protected]> * Add empty test files to fix build Signed-off-by: Yuri Shkuro <[email protected]> * Move grpc config empty_test file Signed-off-by: Charles Dixon <[email protected]> * Change fmt for error to errors.Wrap Signed-off-by: Charles Dixon <[email protected]> * Use single-line for comprehensions where possible Signed-off-by: Charles Dixon <[email protected]> * Don't accumulate spans before sending Signed-off-by: Charles Dixon <[email protected]> * Add function to serve the plugin Signed-off-by: Charles Dixon <[email protected]> * Small grpc client refactor Signed-off-by: Charles Dixon <[email protected]> * Update grpc interface and move noop plugin to examples Signed-off-by: Charles Dixon <[email protected]> * Add missed fix for factory Signed-off-by: Charles Dixon <[email protected]> * Rename memory-store example to memstore-plugin Signed-off-by: Charles Dixon <[email protected]> * Refactor Serve to call ServeWithGRPCServer Signed-off-by: Charles Dixon <[email protected]> * Refactor to make some structs private Signed-off-by: Charles Dixon <[email protected]> * Change factory_test to use mocks Signed-off-by: Charles Dixon <[email protected]> * Add storage grpc integration test Signed-off-by: Charles Dixon <[email protected]> * Create mocks for storage_v1 and add grpc client tests Signed-off-by: Charles Dixon <[email protected]> * Add grpc server tests Signed-off-by: Charles Dixon <[email protected]> * Run make fmt Signed-off-by: Charles Dixon <[email protected]> * Strip unnecessary code from test Signed-off-by: Charles Dixon <[email protected]>
- Loading branch information