jaydoane commented on a change in pull request #1432: Support callback module
data provider
URL: https://github.com/apache/couchdb/pull/1432#discussion_r202157768
##########
File path: src/couch_epi/src/couch_epi_data.erl
##########
@@ -102,12 +102,15 @@ definitions({file, FilePath}) ->
{error, Reason} ->
{error, {FilePath, Reason}}
end;
-definitions({module, Module}) when is_atom(Module) ->
- definitions({module, [Module]});
-definitions({module, Modules}) ->
+definitions({static_module, Module}) when is_atom(Module) ->
+ definitions({static_module, [Module]});
+definitions({static_module, Modules}) ->
Data = lists:append([M:data() || M <- Modules]),
Hash = couch_epi_functions_gen:hash(Modules),
- {ok, Hash, Data}.
+ {ok, Hash, Data};
+definitions({callback_module, Module}) ->
+ Data = Module:data(),
Review comment:
This is some great detail @iilyak, and I wonder if it wouldn't improve
couch_epi if you copied some of it over to that repository's documentation?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services