package
0.14.5
Repository: https://github.com/ipfs/ipfs-cluster.git
Documentation: pkg.go.dev

# Packages

Package test provides utility methods to test APIs based on the common API.

# Functions

NewAPI creates a new common API component with the given configuration.
NewAPIWithHost creates a new common API component and enables the libp2p-http endpoint using the given Host, if not nil.

# Constants

When passed to SendResponse(), it will figure out which http status to set by itself.

# Variables

ErrHTTPEndpointNotEnabled is returned when trying to perform operations that rely on the HTTPEndpoint but it is disabled.
ErrNoEndpointEnabled is returned when the API is created but no HTTPListenAddr, nor libp2p configuration fields, nor a libp2p Host are provided.

# Structs

API implements an API and aims to provides a RESTful HTTP API for Cluster.
Config provides common API configuration values and allows to customize its behaviour.
Route defines a REST endpoint supported by this API.