-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: ipfs shutdown #1200
feat: ipfs shutdown #1200
Conversation
package.json
Outdated
@@ -121,7 +121,7 @@ | |||
"libp2p-circuit": "~0.1.4", | |||
"libp2p-floodsub": "~0.13.1", | |||
"libp2p-kad-dht": "~0.6.0", | |||
"libp2p-mdns": "~0.9.1", | |||
"libp2p-mdns": "^0.9.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the use of ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, that was npm install
and poor review by me. Will fix.
Will rebase tomorrow. |
204c683
to
fefe0cb
Compare
@richardschneider since this exists for go and for js ipfs, can you make tests on interface-ipfs-core and document the API call? |
Did documentation, from IRC
|
README.md
Outdated
@@ -325,6 +325,7 @@ A complete API definition is in the works. Meanwhile, you can learn how to you u | |||
- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md) | |||
- [`ipfs.id([callback])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#id) | |||
- [`ipfs.version([callback])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#version) | |||
- [`ipfs.shutdown([callback])`](https://github.com/ipfs/interface-ipfs-core/tree/master/SPEC/MISCELLANEOUS.md#shutdown) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking more about this. shutdown
is a c&p of stop
. Can we use just stop instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we could change it to stop
. It's not a c&p, it's even simpler: this.shutdown = this.stop
.
However, the /api/v0/shutdown
end-point is already defined by go
, so we must support it.
Also what do we do about the CLI; jsipfs shutdown
or jsipfs stop
or both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richardschneider let's do the this.shutdown = this.stop
for now and keep the CLI as just shutdown.
Note, the HTTP API doesn't have to match entirely to the Core API which doesn't have to match the CLI API. It should enable the users to do the same operations, but we do have to have into account that they are used in different contexts. We will need to revisit all of the APIs later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diasdavid I'm very confused. Is this PR now okay? What about ipfs-inactive/js-ipfs-http-client#685?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost.
The spec should be ipfs.stop
as it is on https://github.com/ipfs/interface-ipfs-core/pull/215/files and we can have an alias for ipfs.shutdown
in both js-ipfs and js-ipfs-api just for the sake of convenience.
Similar to how we do alias on https://github.com/ipfs/js-ipfs-api/#files
@diasdavid This is RTM. Failures are in other tests. |
@RichardLitt Circle CI disagrees The error comes from the code that changed here. However, why are MFS tests running against js-ipfs, @hacdias ? |
Ping @richardschneider |
@RichardLitt you can email on makaretu (at) gmail |
I, uh, don't need to. @diasdavid pinged the wrong richard. :) |
* feat: route to shutdown daemon * feat: cli and http-api shutdown * chore: argggh fix the command count * chore: merge conflicts * chore: rebasing * chore: fix rebase errors * docs: add ipfs.shutdown * fix: always report state error when stopping * chore: documentation is 'stop' not 'shutdown' * fix: generic stop * fix: package.json
* feat: route to shutdown daemon * feat: cli and http-api shutdown * chore: argggh fix the command count * chore: merge conflicts * chore: rebasing * chore: fix rebase errors * docs: add ipfs.shutdown * fix: always report state error when stopping * chore: documentation is 'stop' not 'shutdown' * fix: generic stop * fix: package.json
* feat: route to shutdown daemon * feat: cli and http-api shutdown * chore: argggh fix the command count * chore: merge conflicts * chore: rebasing * chore: fix rebase errors * docs: add ipfs.shutdown * fix: always report state error when stopping * chore: documentation is 'stop' not 'shutdown' * fix: generic stop * fix: package.json
See issue #1192