localbinary

package
v0.5.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2015 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PluginEnvKey = "MACHINE_PLUGIN_TOKEN"
	PluginEnvVal = "42"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DriverPlugin

type DriverPlugin interface {
	PluginServer
	PluginStreamer
}

DriverPlugin interface wraps the underlying mechanics of starting a driver plugin server and then figuring out where it can be dialed.

type LocalBinaryExecutor

type LocalBinaryExecutor struct {
	DriverName string
	// contains filtered or unexported fields
}

func (*LocalBinaryExecutor) Close

func (lbe *LocalBinaryExecutor) Close() error

func (*LocalBinaryExecutor) Start

func (lbe *LocalBinaryExecutor) Start() (*bufio.Scanner, *bufio.Scanner, error)

type LocalBinaryPlugin

type LocalBinaryPlugin struct {
	Executor    McnBinaryExecutor
	Addr        string
	MachineName string
	// contains filtered or unexported fields
}

func NewLocalBinaryPlugin

func NewLocalBinaryPlugin(driverName string) *LocalBinaryPlugin

func (*LocalBinaryPlugin) Address

func (lbp *LocalBinaryPlugin) Address() (string, error)

func (*LocalBinaryPlugin) AttachStream

func (lbp *LocalBinaryPlugin) AttachStream(scanner *bufio.Scanner) (<-chan string, chan<- bool)

func (*LocalBinaryPlugin) Close

func (lbp *LocalBinaryPlugin) Close() error

func (*LocalBinaryPlugin) Serve

func (lbp *LocalBinaryPlugin) Serve() error

type McnBinaryExecutor

type McnBinaryExecutor interface {
	// Execute the driver plugin.  Returns scanners for plugin binary
	// stdout and stderr.
	Start() (*bufio.Scanner, *bufio.Scanner, error)

	// Stop reading from the plugins in question.
	Close() error
}

type PluginServer

type PluginServer interface {
	// Get the address where the plugin server is listening.
	Address() (string, error)

	// Serve kicks off the plugin server.
	Serve() error

	// Close shuts down the initialized server.
	Close() error
}

type PluginStreamer

type PluginStreamer interface {
	// Return a channel for receiving the output of the stream line by
	// line, and a channel for stopping the stream when we are finished
	// reading from it.
	//
	// It happens to be the case that we do this all inside of the main
	// plugin struct today, but that may not be the case forever.
	AttachStream(*bufio.Scanner) (<-chan string, chan<- bool)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL