Features API and implementation.

Implement ability to enable, disable and query feature flags.

Features are identified as atoms. Usage intent is for various components in the
system to enable features, then the HTTP API will expose those to the user.
For example, features could indicate the presence of an optional component, a
plugin or a new mode of operation.

The API has 3 functions:

 * `config:features/0` : Return a sorted list of feature flags

 * `config:enable_feature/1` : Enables a feature. Feature argument could be a
   list, a binary or an atom.

 * `config:disable_feature/1` : Disables a feature.

Implementation is a thin wrapper around setting and deleting keys from the
'[features]' config section. This means, users can also set their own features
there via the .ini config files. Features set via the API are not persistent,
so applications will have to set them every time they initialize.

COUCHDB-3180
2 files changed
tree: e273e8bcd6aae7676f2d83993cafd9f3ac739510
  1. src/
  2. test/
  3. .travis.yml
  4. LICENSE