0d73d33ef5
This commit continues the work of taking advantage of the streaming capabilities in go-libp2p-gorpc by improving the ipfsconnector and pintracker components. StatusAll and RecoverAll methods are now streaming methods, with the REST API output changing accordingly to produce a stream of GlobalPinInfos rather than a json array. pin/ls request to the ipfs daemon now use ?stream=true and avoid having to load the full pinset map on memory. StatusAllLocal and RecoverAllLocal requests to the pin tracker stream all the way and no longer store the full pinset, and the full PinInfo status slice before sending it out. We have additionally switched to a pattern where streaming methods receive the channel as an argument, allowing the caller to decide on whether to launch a goroutine, do buffering etc. |
||
---|---|---|
.. | ||
.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 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