discovery

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: Apache-2.0 Imports: 9 Imported by: 110

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.

Types

type Plugins

type Plugins interface {
	Find(name string) (*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