Skip to content

Commit

Permalink
examples: Use GRPC by default
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Sep 26, 2018
1 parent 045b344 commit 0cf1b43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/grpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
}

// Request the plugin
raw, err := rpcClient.Dispense("kv")
raw, err := rpcClient.Dispense("kv_grpc")
if err != nil {
fmt.Println("Error:", err.Error())
os.Exit(1)
Expand Down Expand Up @@ -61,7 +61,8 @@ func main() {
}

default:
fmt.Println("Please only use 'get' or 'put'")
fmt.Printf("Please only use 'get' or 'put', given: %q", os.Args[0])
os.Exit(1)
}
os.Exit(0)
}
3 changes: 2 additions & 1 deletion examples/grpc/shared/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var Handshake = plugin.HandshakeConfig{

// PluginMap is the map of plugins we can dispense.
var PluginMap = map[string]plugin.Plugin{
"kv": &KVPlugin{},
"kv_grpc": &KVGRPCPlugin{},
"kv": &KVPlugin{},
}

// KV is the interface that we're exposing as a plugin.
Expand Down

0 comments on commit 0cf1b43

Please sign in to comment.