couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [16/29] git commit: add draft for `couch_plugins:uninstall()`
Date Fri, 17 Jan 2014 23:09:50 GMT
add draft for `couch_plugins:uninstall()`


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-plugins/commit/81965a6b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-plugins/tree/81965a6b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-plugins/diff/81965a6b

Branch: refs/heads/import
Commit: 81965a6b2420178a1db28e79b9a2780ded9703e9
Parents: f44dd76
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.erl | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-plugins/blob/81965a6b/src/couch_plugins.erl
----------------------------------------------------------------------
diff --git a/src/couch_plugins.erl b/src/couch_plugins.erl
index 7adadc4..9c2c58f 100644
--- a/src/couch_plugins.erl
+++ b/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