Elektra
0.8.14
|
Plugins can be mounted into the KDB and can access or manipulate the KeySet on every access.
Multiple plugins can be mounted into the key data base. On every access to the key data base they are executed and thus can change the functionality.
Elektra already has a wide range of different plugins. The plugin folders should contain a README.md with further information. (Or follow links below.) The plugins are:
For background information see elektra-plugins-framework(7).
All plugins implement the same interface:
kdbOpen()
calls elektraPluginOpen()
of every plugin to let them do their initialisation.kdbGet()
requests elektraPluginGet()
of every plugin in the queried backends to return a key set.kdbSet()
usually calls elektraPluginSet()
of every plugin in the queried backends to store the configuration.kdbSet()
also calls elektraPluginError()
for every plugin when an error happens. Because of elektraPluginError()
, plugins are guaranteed to have their chance for necessary cleanups.kdbClose()
makes sure that plugins can finally free their own resources in elektraPluginClose()
.For an easy introduction, see this tutorial how to write a storage plugin. For more background information of the plugin framework, continue here. Otherwise, you can visit the the API documentation.
Before configuration is actually written, the file name needs to be determined (will be automatically added by kdb mount):
and afterwards the configuration file must be synced with harddisc (recommended to add at every kdb mount):
Are responsible for reading writing the configuration to configuration files.
Read and write everything a KeySet might contain:
Read (and write) standard config files of /etc:
Using semi-structured data for config files:
Plugins that just show some functionality, (currently) not intended for productive use:
Information compiled in Elektra:
Providing information found on the system not available in persistent files:
Filter plugins process keys and their values in both directions. In one direction they undo what they do in the other direction. Most filter plugins available now encode and decode values. Storage plugins that use characters to separate key names, values or metadata will not work without them.
Rewrite unwanted characters with different techniques:
Transformations:
Doing other stuff:
.
.Log/Send out all changes to configuration to:
Trace everything that happens within KDB:
Copies meta data to keys:
Plugins that check if values are valid based on meta data (typically copied by another plugin just before):
These plugins start an interpreter and allow you to use a bindings.
To add a new plugin you can copy the template plugin. Please make sure to add your plugin: