extpoints

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

generated by go-extpoints -- DO NOT EDIT

Package extpoints provides methods that engine plugins can register their implements with as an import side-effect.

Index

Constants

This section is empty.

Variables

View Source
var EngineProviders = &engineProviderExt{
	newExtensionPoint(new(EngineProvider)),
}

Functions

func RegisterExtension

func RegisterExtension(extension interface{}, name string) []string

func UnregisterExtension

func UnregisterExtension(name string) []string

Types

type EngineOptions

type EngineOptions struct {
	//TODO: Add some json.RawMessage or other free-form configuration section
	//			that is read from the config file...
	Environment *runtime.Environment
}

EngineOptions is a wrapper for the set of options/arguments given to an EngineProvider when an Engine is created.

We pass all options as a single argument, so that we can add additional properties without breaking source compatibility.

type EngineProvider

type EngineProvider func(options EngineOptions) (engines.Engine, error)

EngineProvider is the interface engine implementors must implement and register with extpoints.Register(provider, "EngineName")

This function must return an Engine implementation, generally this will only be called once in an application. But implementors should aim to write reentrant code.

Any error here will be fatal and likely cause the worker to stop working. If an implementor can determine that the platform isn't supported at compile-time it is recommended to not register the implementation.

Jump to

Keyboard shortcuts

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