# README
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
# Functions
IsPeerAddress detects if the given multiaddress identifies a libp2p peer, either because it has the /p2p/ protocol or because it uses /dnsaddr/.
NewDefaultClient initializes a client given a Config.
NewLBClient returns a new client that would load balance requests among clients.
WaitFor is a utility function that allows for a caller to wait until a CID status target is reached (as given in StatusFilterParams).
# Variables
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
# Structs
Config allows to configure the parameters to connect to the ipfs-cluster REST API.
Failover is a load balancing strategy that would try the first cluster peer first.
RoundRobin is a load balancing strategy that would use clients in a sequence for all methods, throughout the lifetime of the lb client.
StatusFilterParams contains the parameters required to filter a stream of status results.
# Interfaces
Client interface defines the interface to be used by API clients to interact with the ipfs-cluster-service.
LBStrategy is a strategy to load balance requests among clients.