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/08/02 22:08:55 UTC

[41/49] git commit: updated refs/heads/1867-feature-plugins to d269b53

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/3b41ce92
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3b41ce92
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3b41ce92

Branch: refs/heads/1867-feature-plugins
Commit: 3b41ce92b0dbc1a18bbebd7dacd585ae578218ac
Parents: fc2717c
Author: Jan Lehnardt <ja...@apache.org>
Authored: Fri Aug 2 18:17:29 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Fri Aug 2 21:17:05 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/3b41ce92/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.
+
 %% * * *