ipfs-cluster/api/rest/client
Hector Sanjuan c7847e9677 rest/client: WaitFor(): support waiting for N peers to reach target.
This commit updates the WaitFor StatusFilterParams to add a Limit field, and
reworks the waiting logic to simplify it.

The Limit parameter causes WaitFor to return successfully when N number of
peers have reached the target status, regardless of what other statuses are
(as long as they are not errors)

Other than that, the function logic should remain the same, blocking until all
statuses are the target, with a special case about target-Pinned, which causes
Remote statuses to be ignored.
2021-08-13 11:24:54 +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 gofmt -s fixes 2020-04-14 23:44:18 +02:00
client.go health/alerts endpoint: brush up old PR 2021-01-13 22:09:21 +01:00
lbclient_test.go Avoid out of index error in failover (#951) 2019-11-13 12:15:29 +01:00
lbclient.go health/alerts endpoint: brush up old PR 2021-01-13 22:09:21 +01:00
methods_test.go rest/client: WaitFor(): support waiting for N peers to reach target. 2021-08-13 11:24:54 +02:00
methods.go rest/client: WaitFor(): support waiting for N peers to reach target. 2021-08-13 11:24:54 +02:00
README.md Fix #765 Added needed gx references 2019-07-04 13:57:52 +01:00
request.go staticcheck: fix all staticcheck warnings in the project 2020-04-14 20:16:10 +02:00
transports.go Restapi: API libp2p host and client should no longer use secio. (#1316) 2021-02-24 16:10:44 +01:00

ipfs-cluster client

Made by Main project IRC channel standard-readme compliant GoDoc Go Report Card Build Status Coverage Status

Go client for 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/ipfs-cluster/api/rest/client in your code.

The code can be downloaded and tested with:

$ go get -u -d github.com/ipfs/ipfs-cluster
$ cd $GOPATH/src/github.com/ipfs/ipfs-cluster/rest/api/client
$ go test -v

Usage

Documentation can be read at Godoc.

Contribute

PRs accepted.

License

MIT © Protocol Labs