\label{doc_dev_plugins-framework_md_md_doc_dev_plugins_framework}%
\Hypertarget{doc_dev_plugins-framework_md_md_doc_dev_plugins_framework}%


The key database of Elektra basically passes a {\ttfamily Key\+Set} from plugin to plugin. Plugins can be chained or nested. The library {\ttfamily libelektra-\/kdb} only interacts with specially designed hook plugins as well as one special type of plugin called a {\itshape backend plugin}, usually with other plugins nested below. All other plugins must be called by these backend plugins. Backend plugins then usually implement some kind of plugin chaining.\hypertarget{doc_dev_plugins-framework_md_autotoc_md2663}{}\doxysection{Contract}\label{doc_dev_plugins-framework_md_autotoc_md2663}
In theory a plugin could do pretty much anything. In practice, however, plugins must meet certain expectations, described by the plugin\textquotesingle{}s contract.

Every plugin should provide a full contract to give information how it will work with other plugins. Most parts of the contract are obligatory. Plugins cannot be loaded without this information. For example, plugins must provide the clause {\ttfamily infos/version}.\hypertarget{doc_dev_plugins-framework_md_autotoc_md2664}{}\doxysection{Plugin Instances}\label{doc_dev_plugins-framework_md_autotoc_md2664}
\hypertarget{doc_dev_plugins-framework_md_autotoc_md2665}{}\doxysection{Operations}\label{doc_dev_plugins-framework_md_autotoc_md2665}
\hypertarget{doc_dev_plugins-framework_md_autotoc_md2666}{}\doxysection{Plugin providers}\label{doc_dev_plugins-framework_md_autotoc_md2666}
Next to the backend plugins, already introduced before, there a few other common types of plugins that will be explained below.\hypertarget{doc_dev_plugins-framework_md_autotoc_md2667}{}\doxysubsection{Backend Plugins}\label{doc_dev_plugins-framework_md_autotoc_md2667}
Backend plugins are a special type of plugin. Compared to other plugins they have a more strict contract for what they may and may not do in certain situations. This is because they are the only plugins that are invoked by {\ttfamily libelektra-\/kdb}. Other plugins are normally called by a backend plugin, although any plugin may call another.

To {\ttfamily libelektra-\/kdb} it doesn\textquotesingle{}t matter what other plugins do, as long as the backend plugins hide unexpected behavior. In other words backend plugins must ensure that to the outside everything behaves according to the contract.

While any plugin could be used as backend plugin, only a select few will behave according to the contract for backend plugins. Therefore, it is important to know which plugins can and cannot be used as backend plugins.

For more information on the contract for backend plugins, take a look at the \mbox{\hyperlink{doc_dev_backend-plugins_md}{relevant documentation}}.

It is also important to note, that not every plugin will be compatible with every backend plugin. Some backend plugins may not support calling other plugins at all, while others may also have their own contracts for the plugins they call. For example, the default backend plugin called {\ttfamily backend} requires a {\itshape resolver plugin} and a {\itshape storage plugin} to function. Because these are very important types of plugins, they are also explained below.\hypertarget{doc_dev_plugins-framework_md_autotoc_md2668}{}\doxysubsection{Resolver Plugins}\label{doc_dev_plugins-framework_md_autotoc_md2668}
\hypertarget{doc_dev_plugins-framework_md_autotoc_md2669}{}\doxysubsection{Storage Plugins}\label{doc_dev_plugins-framework_md_autotoc_md2669}
\hypertarget{doc_dev_plugins-framework_md_autotoc_md2670}{}\doxysubsection{Validation Plugins}\label{doc_dev_plugins-framework_md_autotoc_md2670}
