You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by iilyak <gi...@git.apache.org> on 2015/09/28 20:27:25 UTC

[GitHub] couchdb-chttpd pull request: Update to new couch_epi API

GitHub user iilyak opened a pull request:

    https://github.com/apache/couchdb-chttpd/pull/77

    Update to new couch_epi API

    Depends on https://github.com/apache/couchdb-couch-epi/pull/12

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-chttpd simplify_couch_epi

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-chttpd/pull/77.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #77
    
----
commit faca4ca1e6c72d631a01b07721f529ae1e428c78
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-09-28T16:47:02Z

    Update to new couch_epi API

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-chttpd pull request: Update to new couch_epi API

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/77#discussion_r40687622
  
    --- Diff: src/chttpd_sup.erl ---
    @@ -57,10 +54,8 @@ lru_opts() ->
                 []
         end.
     
    -auth_cache_handler() ->
    -    case application:get_env(chttpd, auth_cache) of
    -        {ok, Module} ->
    -            Module;
    -        _ ->
    -            chttpd_auth_cache
    -    end.
    +add_auth_cache_if_missing(Children) ->
    --- End diff --
    
    this is in case `couch_epi:register_service(chttpd_epi)` returns a replacement but it's ad-hoc. Would it a better api to pass the pre-epi children in and then use the return value instead? that way chttpd_epi plugins could remove unwanted children cleanly. something like;
    
    ```
    Children0 = [?CHILD(auth_cache_handler(), worker), and others...],
    Children1 = couch_epi:register_service(chttpd_epi, Children0),
    {ok, {{one_for_one, 3, 10}, Children1}.
    ```
    register_service would modify the input list, replacing the auth_cache childspec.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-chttpd pull request: Update to new couch_epi API

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-chttpd/pull/77


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-chttpd pull request: Update to new couch_epi API

Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/77#discussion_r40719046
  
    --- Diff: src/chttpd_sup.erl ---
    @@ -57,10 +54,8 @@ lru_opts() ->
                 []
         end.
     
    -auth_cache_handler() ->
    -    case application:get_env(chttpd, auth_cache) of
    -        {ok, Module} ->
    -            Module;
    -        _ ->
    -            chttpd_auth_cache
    -    end.
    +add_auth_cache_if_missing(Children) ->
    --- End diff --
    
    Implemented in https://github.com/apache/couchdb-couch-epi/commit/33e8bae844e0994f024ee067196161d61872fcfb


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---