Closed josephmturner closed 1 year ago
That's a great idea. I think my only adjustment would be to use DELETE hyper://localhost?key=NAME
.
Sadly the new version of hypercore/hyperdrive doesn't have a .destroyData()
method anymore. https://github.com/holepunchto/hypercore/pull/255
I'll need to dig into the source code to see how to interface with the current storage module to make this happen.
Yeah I think I'll need to submit some PRs for this to hypercore to start.
That's a great idea. I think my only adjustment would be to use DELETE hyper://localhost?key=NAME.
Sounds good to me!
Sadly the new version of hypercore/hyperdrive doesn't have a .destroyData() method anymore. holepunchto/hypercore#255
I'll need to dig into the source code to see how to interface with the current storage module to make this happen.
Thank you!
DELETE hyper://localhost?key=NAME
We should also provide an API for deleting writable hyperdrives by public key in case the key name is not known.
We should also provide an API for deleting writable hyperdrives by public key in case the key name is not known.
could you elaborate on this use case? in general if an application is creating and destroying drives it should be tracking the names of the drives which it is creating and destroying
In hyperdrive.el, we do track names of drives being created or destroyed. I thought it would make sense for hyper-gateway to be the source of truth for writable drive names (while hyperdrive.el would just keep a cache), but from your comment here, I understand that's not intended.
DELETE hyper://localhost?key=NAME
sounds like a good API to me!
Yeah I think I'll need to submit some PRs for this to hypercore to start.
Is this still the case? I see that the Hyperdrive API now includes drive.purge()
.
Oh perfect! drive.purge
is exactly what I needed.
Looks like this is done! Thank you!!
Perhaps we could use a
POST
request to delete a hyperdrive, like:POST hyper://localhost/?delete=true&key=NAME