You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2013/10/03 16:11:36 UTC
[36/50] [abbrv] git commit: updated refs/heads/1867-feature-plugins
to 95d6e35
add draft for `couch_plugins:uninstall()`
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/dd836092
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/dd836092
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/dd836092
Branch: refs/heads/1867-feature-plugins
Commit: dd836092265ad6060edbede0624e91e40a06b00a
Parents: 0f7a4ef
Author: Jan Lehnardt <ja...@apache.org>
Authored: Fri Aug 2 18:17:29 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Thu Oct 3 16:08:36 2013 +0200
----------------------------------------------------------------------
src/couch_plugins/src/couch_plugins.erl | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/dd836092/src/couch_plugins/src/couch_plugins.erl
----------------------------------------------------------------------
diff --git a/src/couch_plugins/src/couch_plugins.erl b/src/couch_plugins/src/couch_plugins.erl
index 7adadc4..9c2c58f 100644
--- a/src/couch_plugins/src/couch_plugins.erl
+++ b/src/couch_plugins/src/couch_plugins.erl
@@ -51,6 +51,33 @@ install({Name, _BaseUrl, Version, Checksums}=Plugin) ->
ok.
+% Idempotent uninstall, if you uninstall a non-existant
+% plugin, you get an `ok`.
+% -spec uninstall(string()) -> ok | {error, string()}.
+% uninstall(Name) ->
+% % unload app
+% ok = unload_plugin(Name),
+% log("plugin unloaded"),
+
+% % unload config
+% ok = unload_config(Name),
+% log("config unloaded"),
+
+% % delete files
+% ok = delete_files(Name),
+% log("files deleted"),
+
+% % remove code path
+% ok = remove_code_path(Name),
+% log("removed code path"),
+
+% % unregister plugin
+% ok = unregister_plugin(Name),
+% log("unregistered plugin"),
+
+% % done
+% ok.
+
%% * * *