summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2013-08-02 18:17:29 +0200
committerJan Lehnardt <jan@apache.org>2013-10-03 16:08:36 +0200
commitdd836092265ad6060edbede0624e91e40a06b00a (patch)
treeade816db2f71c9d3320bf2239f43143ca86e59b8
parent0f7a4efa663da5dea5d89afb773518535038beec (diff)
downloadcouchdb-dd836092265ad6060edbede0624e91e40a06b00a.tar.gz
add draft for `couch_plugins:uninstall()`
-rw-r--r--src/couch_plugins/src/couch_plugins.erl27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/couch_plugins/src/couch_plugins.erl b/src/couch_plugins/src/couch_plugins.erl
index 7adadc49c..9c2c58fbf 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.
+
%% * * *