|
%!s(int64=3) %!d(string=hai) anos | |
---|---|---|
.. | ||
readme.md | %!s(int64=3) %!d(string=hai) anos |
There are 2 ways to install portable plugins. One is to install by REST/CLI API. Another is to put all the plugin files with specified format into this path 'plugins/portable'.
There are two levels of a portable plugin. Each plugin has one single executable which will be executed as a separated process in runtime. Uses can define multiple symbols
inside the one plugin. Each symbol could be a source, sink or function. Thus, when defining a portable plugin, users can get a set of new source, sink and function registered.
For example, users can define a plugin named car
and export many symbols for source, sink and function. The definition will be presented as a json file as below:
{
"name": "car",
"version": "v1.0.0",
"language": "go",
"executable": "server",
"sources": [
"json","udp","sync"
],
"sinks": [
"command"
],
"functions": [
"link", "rank"
]
}
Each portable plugin requires the following structure:
Take the car
plugin as an example. To load it automatically, uses need to put it in this structure:
etc
sources
json.yaml
json.json
udp.yaml
udp.json
sync.yaml
sync.json
sinks
command.json
functions
link.json
rank.json
plugins
portable
car
server
car.json
Notice that, the symbol name must be unique for a specific plugin type. By adding the plugin directory to plugins/portable
, the plugin will be loaded once eKuiper starts.