ipfs-cluster/api/rest/client
Hector Sanjuan 21855c3130 Fix bad context propagation / deadlocks
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.
2022-09-26 19:35:55 +02:00
..
.travis.yml Fix #260: Add REST API client and use it in ipfs-cluster-ctl 2017-12-06 20:12:01 +01:00
client_test.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
client.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
lbclient_test.go Migrate from ipfs/ipfs-cluster to ipfs-cluster/ipfs-cluster 2022-06-16 17:43:30 +02:00
lbclient.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
methods_test.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
methods.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00
README.md README: more improvements to badges 2022-06-16 17:43:30 +02:00
request.go Fix bad context propagation / deadlocks 2022-09-26 19:35:55 +02:00
transports.go Dependency upgrades (#1755) 2022-09-06 16:57:17 +02:00

ipfs-cluster client

Made by Main project Discord Matrix channel pkg.go.dev

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