63972f2b2e
This is a preparatory PR to add additional APIs (Pinning Service API) easily to cluster. Instead of copy-pasting most of what the REST API does, I have refactored so that the whole configuration, routing and request-handling utilities can be re-used. The worst part has been to divide the test between tests that test core (common.API) functionality and tests that test specific REST API endpoint functionality. I could not get away without an additional common/test package to provide functions that are used from both places. This is a side effect of testing both http and libp2p endpoints for every request 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