| Elektra 0.11.0

Plugins Framework

The key database of Elektra basically passes a `KeySet` from plugin to plugin. Plugins can be chained or nested. The library `libelektra-kdb` only interacts with specially designed hook plugins as well as one special type of plugin called a 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.

# Contract

In theory a plugin could do pretty much anything. In practice, however, plugins must meet certain expectations, described by the plugin'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 `infos/version`.

# Plugin Instances

# Operations

# Plugin providers

Next to the backend plugins, already introduced before, there a few other common types of plugins that will be explained below.

## Backend Plugins

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 `libelektra-kdb`. Other plugins are normally called by a backend plugin, although any plugin may call another.

To `libelektra-kdb` it doesn'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 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 `backend` requires a resolver plugin and a storage plugin to function. Because these are very important types of plugins, they are also explained below.

## Resolver Plugins

## Storage Plugins

## Validation Plugins