For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
To test it, set up an S3 bucket (in an AWS region that is not US
Standard, for read-after-write consistency), run `ipfs init`, then
edit `~/.ipfs/config` to say
"Datastore": {
"Type": "s3",
"Region": "us-west-1",
"Bucket": "mahbukkit",
"ACL": "private"
},
with the right values. Set `AWS_ACCESS_KEY_ID` and
`AWS_SECRET_ACCESS_KEY` in the environment and you should be able to
run `ipfs add` and `ipfs cat` and see the bucket be populated.
No automated tests exist, unfortunately. S3 is thorny to simulate.
License: MIT
Signed-off-by: Tommi Virtanen <tv@eagain.net>
Earlier, it also checked checked the leveldb directory. That part
added no crash safety to the application, and just hardcoded
assumptions about the datastore.
If anything, this should rely on the absolute last item created by
fsrepo.Init, and there should be fsync guarantees about ordering.
License: MIT
Signed-off-by: Tommi Virtanen <tv@eagain.net>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
rewrite path to filepath in fsrepo
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
remove api file on repo close
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
update function to check normal net.OpErrors
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit adds support for the --api option, which allows users
to specify an API endpoint to run the cli command against. It enables
much easier control of remote daemons.
It also
- ensures the API server version matches the API client
- implements support for the $IPFS_PATH/api file
Still TODO:
- tests!
- multiaddr to support /dns/
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
WARNING: No migration performed! That needs to come in a separate
commit, perhaps amended into this one.
Migration must move keyspace "/b" from leveldb to the flatfs subdir,
while removing the "b" prefix (keys should start with just "/").
We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.
It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
repo.Once now does refcounts on a whole Repo level, returning the same
pointer to multiple Openers. This removes the need for the weird model
of separate FSRepo instances pointing to the same underlying storage,
and the races caused by that.
This is only called from `ipfs` command line tool well before it opens
the repo. The behavior change here causes a false positive if the
current process has already opened the repo. That's a bit late to ask
this question, anyway, and is not expected to have ever triggered.