[
https://issues.apache.org/jira/browse/COUCHDB-3180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nick Vatamaniuc updated COUCHDB-3180:
-------------------------------------
Comment: was deleted
(was: From GH [~rnewson] mentioned:
{quote}
We've wanted a general feature discovery thing for a while now so let's come up
with a way for code to register with this. The patch should include that
mechanism even if nothing in couchdb calls it yet, and a test that shows that a
registered feature shows up in the welcome message.
{quote}
Here is what I came up with on first try:
* Don't add a new application, it would be silly.
* Stick it in config application. It seems like a configuration-y thing.
* API looks like
- {{config:features() -> \[<<"feature1">>, <<"feature2">>, ...\].}}
- {{config:feature_enable(<<"feature1">>).}}
- {{config:feature_disable(<<"feature2">>).}}
* Applications enable features and disable them. Then `chttpd` reads list of
features from config and shows them in the welcome message.
* Behind the scenes it is really just writing to config "\[features\]" section
a bunch of booleans. With persistence set to `false`.
* Users can directly set features in the config file if they want. Could be a
something external to the CouchDB instance, maybe something about how code was
compiled or where it is running that warrants a different treatment from the
API standpoint.
The advantage is it doesn't reinvent the world. Takes advantage of config
server (so applications can monitor for changes and such if needed).)
> Add ability to return a list of features in server's welcome message
> --------------------------------------------------------------------
>
> Key: COUCHDB-3180
> URL: https://issues.apache.org/jira/browse/COUCHDB-3180
> Project: CouchDB
> Issue Type: New Feature
> Reporter: Nick Vatamaniuc
>
> This could be used to let users discover quickly the availability of some API
> or modes of operation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)