{"modulePath":"github.com/golemfactory/machine","version":"v0.16.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package localbinary\n\n## Constants\n\n```go\nconst (\n\tPluginEnvKey        = \"MACHINE_PLUGIN_TOKEN\"\n\tPluginEnvVal        = \"42\"\n\tPluginEnvDriverName = \"MACHINE_PLUGIN_DRIVER_NAME\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tCurrentBinaryIsDockerMachine = false\n\tCoreDrivers                  = []string{\"amazonec2\", \"azure\", \"digitalocean\",\n\t\t\"exoscale\", \"generic\", \"google\", \"hyperv\", \"none\", \"openstack\",\n\t\t\"rackspace\", \"softlayer\", \"virtualbox\", \"vmwarefusion\",\n\t\t\"vmwarevcloudair\", \"vmwarevsphere\"}\n)\n```\n\n## Types\n\n```go\ntype DriverPlugin interface {\n\tPluginServer\n\tPluginStreamer\n}\n```\nDriverPlugin interface wraps the underlying mechanics of starting a driver plugin server and then figuring out where it can be dialed.\n\n```go\ntype ErrPluginBinaryNotFound struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (e ErrPluginBinaryNotFound) Error() string\n```\n\n```go\ntype Executor struct {\n\tDriverName string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (lbe *Executor) Close() error\n```\n\n```go\nfunc (lbe *Executor) Start() (*bufio.Scanner, *bufio.Scanner, error)\n```\n\n```go\ntype McnBinaryExecutor interface {\n\t// Execute the driver plugin.  Returns scanners for plugin binary\n\t// stdout and stderr.\n\tStart() (*bufio.Scanner, *bufio.Scanner, error)\n\n\t// Stop reading from the plugins in question.\n\tClose() error\n}\n```\n\n```go\ntype Plugin struct {\n\tExecutor    McnBinaryExecutor\n\tAddr        string\n\tMachineName string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPlugin(driverName string) (*Plugin, error)\n```\n\n```go\nfunc (lbp *Plugin) Address() (string, error)\n```\n\n```go\nfunc (lbp *Plugin) AttachStream(scanner *bufio.Scanner) \u003c-chan string\n```\n\n```go\nfunc (lbp *Plugin) Close() error\n```\n\n```go\nfunc (lbp *Plugin) Serve() error\n```\n\n```go\ntype PluginServer interface {\n\t// Get the address where the plugin server is listening.\n\tAddress() (string, error)\n\n\t// Serve kicks off the plugin server.\n\tServe() error\n\n\t// Close shuts down the initialized server.\n\tClose() error\n}\n```\n\n```go\ntype PluginStreamer interface {\n\t// Return a channel for receiving the output of the stream line by\n\t// line.\n\t//\n\t// It happens to be the case that we do this all inside of the main\n\t// plugin struct today, but that may not be the case forever.\n\tAttachStream(*bufio.Scanner) \u003c-chan string\n}\n```\n\n","path":"github.com/golemfactory/machine/libmachine/drivers/plugin/localbinary","name":"localbinary","synopsis":"","isRedistributable":true}
