Documentation ¶
Overview ¶
Package restapi implements an IPFS Cluster API component. It provides a REST-ish API to interact with Cluster over HTTP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // maximum duration before timing out read of the request RESTAPIServerReadTimeout = 30 * time.Second // maximum duration before timing out write of the response RESTAPIServerWriteTimeout = 60 * time.Second // server-side the amount of time a Keep-Alive connection will be // kept idle before being reused RESTAPIServerIdleTimeout = 120 * time.Second )
Server settings
Functions ¶
This section is empty.
Types ¶
type RESTAPI ¶
type RESTAPI struct {
// contains filtered or unexported fields
}
RESTAPI implements an API and aims to provides a RESTful HTTP API for Cluster.
func NewRESTAPI ¶
NewRESTAPI creates a new REST API component. It receives the multiaddress on which the API listens.
func NewTLSRESTAPI ¶ added in v0.1.0
NewTlsRESTAPI creates a new REST API component that uses TLS for security (authentication, encryption). It receives the multiaddress on which the API listens, as well as paths to certificate and private key files
Click to show internal directories.
Click to hide internal directories.