summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2013-08-02 18:17:29 +0200
committerJan Lehnardt <jan@apache.org>2013-08-02 21:17:05 +0200
commit3b41ce92b0dbc1a18bbebd7dacd585ae578218ac (patch)
tree333f63cc94623061a9dddac90b4561fb542dfecf
parentfc2717cfa5d0c12df6e74c596319d1489085e655 (diff)
downloadcouchdb-3b41ce92b0dbc1a18bbebd7dacd585ae578218ac.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.
+
%% * * *