diff options
Diffstat (limited to 'vendor/github.com/hashicorp/go-plugin/plugin.go')
-rw-r--r-- | vendor/github.com/hashicorp/go-plugin/plugin.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/go-plugin/plugin.go b/vendor/github.com/hashicorp/go-plugin/plugin.go new file mode 100644 index 0000000..37c8fd6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-plugin/plugin.go | |||
@@ -0,0 +1,25 @@ | |||
1 | // The plugin package exposes functions and helpers for communicating to | ||
2 | // plugins which are implemented as standalone binary applications. | ||
3 | // | ||
4 | // plugin.Client fully manages the lifecycle of executing the application, | ||
5 | // connecting to it, and returning the RPC client for dispensing plugins. | ||
6 | // | ||
7 | // plugin.Serve fully manages listeners to expose an RPC server from a binary | ||
8 | // that plugin.Client can connect to. | ||
9 | package plugin | ||
10 | |||
11 | import ( | ||
12 | "net/rpc" | ||
13 | ) | ||
14 | |||
15 | // Plugin is the interface that is implemented to serve/connect to an | ||
16 | // inteface implementation. | ||
17 | type Plugin interface { | ||
18 | // Server should return the RPC server compatible struct to serve | ||
19 | // the methods that the Client calls over net/rpc. | ||
20 | Server(*MuxBroker) (interface{}, error) | ||
21 | |||
22 | // Client returns an interface implementation for the plugin you're | ||
23 | // serving that communicates to the server end of the plugin. | ||
24 | Client(*MuxBroker, *rpc.Client) (interface{}, error) | ||
25 | } | ||