# This is the 1st commit message:
Captain.log.update
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
# The commit message #2 will be skipped:
# Captain log
#
# License: MIT
# Signed-off-by: Hector Sanjuan <code@hector.link>
We had a problem happening when assigning the returned *api.Error
to default 'error' type.
Things like "if err != nil" would not work even when *api.Error is nil
I'm not sure why this happens, but this is very confusing for the user
integrating on top. It is better that we just return plain go errors.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
The multiaddresses protocols for websockets and dns are only registered
with init() function when loading the modules. ipfs-cluster-ctl
uses just the api, which did not load these modules so converting
from serialized types caused bad panics.
We have also ignored errors in the api library under the thinking that it
would only parse things serialized by us, but this has made parsing errors
to go unnoticed. From now, all errors are logged and some precautions
are taking to better handle the possibility of nil objects.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
Apparently, cancelling the request context closes the response body
prematurely, before it's being fully read.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
As before, exit status 1 means a client application error and
exit status 2 means a server-returned error.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This allows taking advantage of connection keep alive by having the
api client re-use the same connection. Additionally, an option
to close connections after every request is provided.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
* Set default logging facility
* Remove old keep-alive comment in tests
* Use a port for TestPeersWithErrors which is not default
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This adds the pakage api/rest/client which implements a go-client
for the REST API component. It also update the ipfs-cluster-ctl
tool to rely on it.
Originally, I wanted this to live it in it's own separate repository,
but the api client uses /api/types.go, which is part of cluster.
Therefore it would need to import all of cluster as a dependency.
ipfs-cluster-ctl would also need to import go-ipfs-cluster-api-client
as a dependency, creating circular gx deps which would be a mess to
maintain.
Only the splitting of cluster in multiple repositories (at least for
api, rest, ipfs-cluster-ctl, rest/client and test) would allow better
dependency management by allowing rest/client and the ctl tool
to only import what is needed, but this is something which brings
maintenance costs and can probably wait a bit until cluster is more stable.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
ipfs-cluster-service now locks before running the daemon and state
upgrade commands. Locking mechanism heavily inspired by ipfs, see
go-ipfs fsrepo. Unlock called on exit to free up repo. one lockfile
per repo. A very simple sharness test checks that two service
invocations cannot occur.
A longstanding sharness/ci logging issue is addressed by exporting
verbose=t into the travis environment. Now output of commands from
within sharness test strings are displayed during travis runs.
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
I've modified the peer identifier to be 'peername'. I've also
modified the TestLoadJSON to check that it is correctly read from
config and set to a default if empty.
Also added 'peername' fields to configurations for various tests.