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 ¶
var EngineProviders = &engineProviderExt{ newExtensionPoint(new(EngineProvider)), }
Functions ¶
func RegisterExtension ¶
func UnregisterExtension ¶
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.