3 This example builds a simple key/value store CLI where the mechanism
4 for storing and retrieving keys is pluggable. To build this example:
7 # This builds the main CLI
10 # This builds the plugin written in Go
11 $ go build -o kv-go-grpc ./plugin-go-grpc
13 # This tells the KV binary to use the "kv-go-grpc" binary
14 $ export KV_PLUGIN="./kv-go-grpc"
17 $ ./kv put hello world
23 ### Plugin: plugin-go-grpc
25 This plugin uses gRPC to serve a plugin that is written in Go:
28 # This builds the plugin written in Go
29 $ go build -o kv-go-grpc ./plugin-go-grpc
31 # This tells the KV binary to use the "kv-go-grpc" binary
32 $ export KV_PLUGIN="./kv-go-grpc"
35 ### Plugin: plugin-go-netrpc
37 This plugin uses the builtin Go net/rpc mechanism to serve the plugin:
40 # This builds the plugin written in Go
41 $ go build -o kv-go-netrpc ./plugin-go-netrpc
43 # This tells the KV binary to use the "kv-go-netrpc" binary
44 $ export KV_PLUGIN="./kv-go-netrpc"
47 ### Plugin: plugin-python
49 This plugin is written in Python:
52 $ export KV_PLUGIN="python plugin-python/plugin.py"
55 ## Updating the Protocol
57 If you update the protocol buffers file, you can regenerate the file
58 using the following command from this directory. You do not need to run
59 this if you're just trying the example.
64 $ protoc -I proto/ proto/kv.proto --go_out=plugins=grpc:proto/
70 $ python -m grpc_tools.protoc -I ./proto/ --python_out=./plugin-python/ --grpc_python_out=./plugin-python/ ./proto/kv.proto