Introduce dynamic plugins
go1.8 Plugin package brings a mechanism for dynamyc loading. StorageDriver or AccessController can be compiled as plugin and can be loaded at runtime. Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
This commit is contained in:
parent
beabc206e1
commit
9b1e893755
13 changed files with 214 additions and 10 deletions
|
@ -89,6 +89,10 @@ log:
|
|||
to:
|
||||
- errors@example.com
|
||||
loglevel: debug # deprecated: use "log"
|
||||
plugins:
|
||||
- /plugins/
|
||||
- /plugin/driver1.so
|
||||
- /plugin/auth1.so
|
||||
storage:
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
|
@ -359,6 +363,21 @@ loglevel: debug
|
|||
Permitted values are `error`, `warn`, `info` and `debug`. The default is
|
||||
`info`.
|
||||
|
||||
## `plugins`
|
||||
|
||||
```none
|
||||
plugins:
|
||||
- /plugins/
|
||||
- /plugin/driver1.so
|
||||
- /plugin/auth1.so
|
||||
```
|
||||
|
||||
> Requires golang >= 1.8
|
||||
|
||||
Directory with plugins or paths point to plugins. Plugin are loaded before trying to initialize
|
||||
any driver or authcontroller. If a path is a directory, it is scanned for plugins loading all files
|
||||
with a is common shared library extension on the platform (`.so`, `.dylib`, `dll`).
|
||||
|
||||
## `storage`
|
||||
|
||||
```none
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue