couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [41/49] git commit: updated refs/heads/1867-feature-plugins to d269b53
Date Fri, 02 Aug 2013 20:08:55 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/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 <jan@apache.org>
Authored: Fri Aug 2 18:17:29 2013 +0200
Committer: Jan Lehnardt <jan@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.
+
 %% * * *
 
 


Mime
View raw message