From 9d91267ab7ab61e41c84eaa81c647cd630d83797 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Wed, 31 Jan 2018 09:45:29 +1300 Subject: [PATCH] feat: shutdown spec --- SPEC/MISCELLANEOUS.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/SPEC/MISCELLANEOUS.md b/SPEC/MISCELLANEOUS.md index 59916350..a5a7f6ac 100644 --- a/SPEC/MISCELLANEOUS.md +++ b/SPEC/MISCELLANEOUS.md @@ -77,3 +77,28 @@ ipfs.dns('ipfs.io', (err, path) => { A great source of [examples][] can be found in the tests for this API. [examples]: https://github.com/ipfs/interface-ipfs-core/blob/master/src/miscellaneous.js + +#### `shutdown` + +> Stop the ipfs daemon + +##### `Go` **WIP** + +##### `JavaScript` - ipfs.shutdown([callback]) + +`callback` must follow `function (err) {}` signature, where `err` is an error if the operation was not successful. +If no `callback` is passed, a promise is returned. + +**Example:** + +```JavaScript +ipfs.shutdown((err) => { + if (err) { + throw err + } +}) +``` + +A great source of [examples][] can be found in the tests for this API. + +[examples]: https://github.com/ipfs/interface-ipfs-core/blob/master/src/miscellaneous.js