discovery

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginDirEnvVar is the environment variable that may be used to customize the plugin discovery path.
	PluginDirEnvVar = "INFRAKIT_PLUGINS_DIR"
)

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir returns the directory to use for plugin discovery, which may be customized by the environment.

func IsErrNotUnixSocket added in v0.3.0

func IsErrNotUnixSocket(e error) bool

IsErrNotUnixSocket returns true if the error is due to the file not being a valid unix socket.

Types

type Plugins

type Plugins interface {
	// Find looks up the plugin by name.  The name can be of the form $lookup[/$subtype].  See GetLookupAndType().
	Find(name plugin.Name) (*plugin.Endpoint, error)
	List() (map[string]*plugin.Endpoint, error)
}

Plugins provides access to plugin discovery.

func NewPluginDiscovery

func NewPluginDiscovery() (Plugins, error)

NewPluginDiscovery creates a plugin discovery based on the environment configuration.

func NewPluginDiscoveryWithDirectory

func NewPluginDiscoveryWithDirectory(pluginDir string) (Plugins, error)

NewPluginDiscoveryWithDirectory creates a plugin discovery based on the directory given.

Jump to

Keyboard shortcuts

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