21855c3130
We are propagating the wrong context (mostly from the Cluster top-level methods). This makes that request cancellations (and cancellations of the associated contexts) are not propagated to many methods, and can result in deadlocks when an operation that is holding a lock is not aborted. This affects for example the operation tracker. Getting all operations from the tracker relies on someone reading from the out channel, or on the context being cancelled. When a request is aborted in the middle of the response, and the context is not cancelled, everything that wants to list operations would become deadlocked, including operations that need write locks like TrackNewOperation. This fixes it. |
||
---|---|---|
.. | ||
.travis.yml | ||
client_test.go | ||
client.go | ||
lbclient_test.go | ||
lbclient.go | ||
methods_test.go | ||
methods.go | ||
README.md | ||
request.go | ||
transports.go |
ipfs-cluster client
Go client for the ipfs-cluster HTTP API.
This is a Go client library to use the ipfs-cluster REST HTTP API.
Table of Contents
Install
You can import github.com/ipfs-cluster/ipfs-cluster/api/rest/client
in your code.
The code can be downloaded and tested with:
$ git clone https://github.com/ipfs-cluster/ipfs-cluster.git
$ cd ipfs-cluster/ipfs-cluster/rest/api/client
$ go test -v
Usage
Documentation can be read at pkg.go.dev.
Contribute
PRs accepted.
License
MIT © Protocol Labs