Go through `ipfsproxy` repo and change things that are inappropriate
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
Extract the IPFS Proxy from ipfshttp and make it an api module
The `ipfshttp` IPFSConnector implementation includes the so called IPFS
Proxy. An endpoint which offers an IPFS API, hijacking some interesting
requests and forwarding the rest to the ipfs daemon.
`ipfshttp` should contain an implementation of IPFSConnector whose only
task should be to talk to IPFS
A new module should be created, `api/ipfsproxy`, an API Component
implementation for Cluster. The whole proxy code should be moved here.
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
This straigthens some mistakes with the outputs of the /add endpoints.
Currently, we had exactly the same output format which:
* was not exactly the ipfs API output format but was sort of similar
* made some weird concessions to be compatible (like having a string-type "size")
* was not aligned with Cluster API conventions (lowercase keys)
This corrects all this:
* The Cluster API /add output format now uses the right types and lowercase keys.
* `Hash` is now `Cid`, because the field carries a Cid.
* We copy error handling with request trailers from IPFS, and avoid carrying the
errors in the output objects.
* The proxy now returns exactly the types as ipfs would
* We add the X-Chunked-Output: 1 header, which is custom and redundant, but
otherwise breaks js-ipfs-api integrations with the /add endpoint.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
When we increased the default concurrency setting
we forgot the tests are for ConcurrentPins=1.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This is a workaround to have clients behave properly with the /add
endpoint by asking them to close connections when done, effectively
disabling keep-alive for this.
This means we don't need to disable keep-alives fully on all servers,
since the rest of endpoints are not affected (they are not streaming
endpoints).
Reference https://github.com/ipfs/go-ipfs/issues/5168
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This commit moves `ipfs-cluster-service` and `ipfs-cluster-ctl` to
`cmd/` directory to follow "standard" project structure.
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
It's not supported in all subpackages. Make test is not really used
in our CI that's why we didn't see this before.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This patch modifies the RPC protocol tag to use Major and Minor parts of the
version and not all of it.
This means all peers on the 0.5.x can run in the same cluster.
As cluster has become more mature and I see less risks in letting peers from
similar versions run together. This is useful when upgrading too.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>