A plugin configuration object is used to create or load a plugin.
It is a JSON object that looks like this:
{
"id": <id>,
"type": <type>,
"params": {
<params>
}
}
id
is a string that defines the URL at which the plugin will be available via the REST APItype
is a string that specified the plugin's type (see below)params
is an object that configures the plugin, and whose contents will vary according to the typeNot all three of these fields are required in all contexts:
id
and type
must be specified
id
is specified, MLDB will assume this is a pre-existing plugin and will try to load it (an error will ensue if it doesn't already exist)type
is specified, MLDB will assume that the plugin doesn't exist yet and will try to create it (an error will ensue if it already exists)
type
is specified without id
, an id will be auto-generatedtype
is specified with id
, the plugin will be created with the specified id
unless a plugin already exists with that idtype
is specified, then a corresponding params
function must be specified if the type requires itThe following types of plugins are available:
Type | Description | Doc |
---|---|---|
javascript | Javascript plugin loader | [doc] |
python | Load plugins or run scripts written in the Python language | [doc] |
sharedLibrary | Plugin loader for compiled shared libraries | [doc] |