virto-network / valor

Create HTTP APIs with a plugin system that runs in the server and the browser.
GNU General Public License v3.0
9 stars 8 forks source link

Instantiatable plugins #36

Closed olanod closed 3 years ago

olanod commented 3 years ago

Loading a plugin should be decoupled form adding an instance to the registry. This would allow having the same plugin being instantiated multiple times with different configuration.
The following definition should load the plugin once and then create different instances:

[
  {"type":"native","name":"foo"},
  {"type":"native","name":"foo", "prefix": "bar"},
  {"type":"native","name":"foo", "prefix": "baz", "cfg": {"prop": "value"}}
]