Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 9d91267

Browse files
feat: shutdown spec
1 parent 0c40084 commit 9d91267

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: SPEC/MISCELLANEOUS.md

+25
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,28 @@ ipfs.dns('ipfs.io', (err, path) => {
7777
A great source of [examples][] can be found in the tests for this API.
7878

7979
[examples]: https://github.com/ipfs/interface-ipfs-core/blob/master/src/miscellaneous.js
80+
81+
#### `shutdown`
82+
83+
> Stop the ipfs daemon
84+
85+
##### `Go` **WIP**
86+
87+
##### `JavaScript` - ipfs.shutdown([callback])
88+
89+
`callback` must follow `function (err) {}` signature, where `err` is an error if the operation was not successful.
90+
If no `callback` is passed, a promise is returned.
91+
92+
**Example:**
93+
94+
```JavaScript
95+
ipfs.shutdown((err) => {
96+
if (err) {
97+
throw err
98+
}
99+
})
100+
```
101+
102+
A great source of [examples][] can be found in the tests for this API.
103+
104+
[examples]: https://github.com/ipfs/interface-ipfs-core/blob/master/src/miscellaneous.js

0 commit comments

Comments
 (0)