localbinary

package
v0.0.0-...-dfdfe39 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

func (*Executor) Close

func (lbe *Executor) Close() error

func (*Executor) Start

func (lbe *Executor) Start() (*bufio.Scanner, *bufio.Scanner, 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 Plugin

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

func NewPlugin

func NewPlugin(driverName string, binaryPath string) (*Plugin, error)

func (*Plugin) Address

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

func (*Plugin) AttachStream

func (lbp *Plugin) AttachStream(scanner *bufio.Scanner) <-chan string

func (*Plugin) Close

func (lbp *Plugin) Close() error

func (*Plugin) Serve

func (lbp *Plugin) Serve() error

Jump to

Keyboard shortcuts

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