couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [29/42] git commit: updated refs/heads/master to a4d6cd4
Date Thu, 03 Oct 2013 14:13:42 GMT
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/master
Commit: dd836092265ad6060edbede0624e91e40a06b00a
Parents: 0f7a4ef
Author: Jan Lehnardt <jan@apache.org>
Authored: Fri Aug 2 18:17:29 2013 +0200
Committer: Jan Lehnardt <jan@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.
+
 %% * * *
 
 


Mime
View raw message