Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*config)
Option modifies config. Zero or more can be passed to Main.
func WithComponent ¶
func WithComponent(comp interface{}, options interface{}) Option
WithComponent registers a single component along with options for that component
func WithComponents ¶
func WithComponents(cs ...interface{}) Option
WithComponents specifies a list of components to serve from the plugin binary. This will append to the list of components to serve. You can currently only serve at most one of each type of plugin.
func WithLogger ¶
func WithLogger(l hclog.Logger) Option
func WithMappers ¶
func WithMappers(ms ...interface{}) Option
WithMappers specifies a list of mappers to apply to the plugin.
Mappers are functions that take zero or more arguments and return one result (optionally with an error). These can be used to convert argument types as needed for your plugin functions. For example, you can convert a proto type to a richer Go struct.
Mappers must take zero or more arguments and return exactly one or two values where the second return type must be an error. Example:
func() *Value func() (*Value, error) -- the above with any arguments
This will append the mappers to the list of available mappers. A set of default mappers is always included to convert from SDK proto types to richer Go structs.
Directories ¶
Path | Synopsis |
---|---|
Package component has the interfaces for all the components that can be implemented.
|
Package component has the interfaces for all the components that can be implemented. |
Package datadir manages the data directories.
|
Package datadir manages the data directories. |
helper
|
|
path
This package provides a simple way to represent a path value and perform common operations on it.
|
This package provides a simple way to represent a path value and perform common operations on it. |
paths
This is used for getting common Vagrant paths that are in use
|
This is used for getting common Vagrant paths that are in use |
internal
|
|
pkg/spinner
Package spinner is a simple package to add a spinner / progress indicator to any terminal application.
|
Package spinner is a simple package to add a spinner / progress indicator to any terminal application. |
pkg/spinner/_example
Example application that uses all of the available API options.
|
Example application that uses all of the available API options. |
pluginargs
Package pluginargs
|
Package pluginargs |
plugincomponent
Package plugincomponent has helpers to convert or expose component implementations for plugin proto structures.
|
Package plugincomponent has helpers to convert or expose component implementations for plugin proto structures. |
testproto
Package testproto contains some protobuf defintions that are used in internal tests.
|
Package testproto contains some protobuf defintions that are used in internal tests. |
internal-shared
|
|
multistep is a library for building up complex actions using individual, discrete steps.
|
multistep is a library for building up complex actions using individual, discrete steps. |
proto
|
|
Package terminal is used by plugins to read and write to a terminal UI.
|
Package terminal is used by plugins to read and write to a terminal UI. |