discovery

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 2 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 IsErrNotFound

func IsErrNotFound(e error) bool

IsErrNotFound returns true if the error is due to a plugin not found.

func IsErrNotUnixSocketOrListener

func IsErrNotUnixSocketOrListener(e error) bool

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

func Must

func Must(d Plugins, err error) func() Plugins

Must returns a plugins lookup or panics on error. The plugin lookup function is common throughout the plugin codebase.

Types

type ErrNotFound

type ErrNotFound string

ErrNotFound is the error raised when the plugin is not found

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

type ErrNotUnixSocketOrListener

type ErrNotUnixSocketOrListener string

ErrNotUnixSocketOrListener is the error raised when the file is not a unix socket

func (ErrNotUnixSocketOrListener) Error

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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