scope

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {

	// Plugins returns the plugin lookup
	Plugins func() discovery.Plugins
}

Scope provides an environment in which the necessary plugins are available for doing a unit of work. The scope can be local or remote, namespaced, depending on implementation. The first implementation is to simply run a set of steps locally on a set of required plugins. Because the scope provides the plugin lookup, it can control what plugins are available. This is good for programmatically control access of what a piece of code can interact with the system. Scope is named scope instead of 'context' because it's much heavier weight and involves lots of calls across process boundaries, yet it provides lookup and scoping of services based on some business logical and locality of code.

type Work

type Work func(Scope) error

Work is a unit of work that is executed in the scope of the plugins running. When work completes, the plugins are shutdown.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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