Categorygithub.com/ipfs-cluster/ipfs-cluster
modulepackage
1.1.1
Repository: https://github.com/ipfs-cluster/ipfs-cluster.git
Documentation: pkg.go.dev

# README

IPFS Cluster

Made by Main project Discord Matrix channel pkg.go.dev Go Report Card codecov

Pinset orchestration for IPFS

logo

IPFS Cluster provides data orchestration across a swarm of IPFS daemons by allocating, replicating and tracking a global pinset distributed among multiple peers.

There are 3 different applications:

  • A cluster peer application: ipfs-cluster-service, to be run along with kubo (go-ipfs) as a sidecar.
  • A client CLI application: ipfs-cluster-ctl, which allows easily interacting with the peer's HTTP API.
  • An additional "follower" peer application: ipfs-cluster-follow, focused on simplifying the process of configuring and running follower peers.

Are you using IPFS Cluster?

Please participate in the IPFS Cluster user registry.


Table of Contents

Documentation

Please visit https://ipfscluster.io/documentation/ to access user documentation, guides and any other resources, including detailed download and usage instructions.

News & Roadmap

We regularly post project updates to https://ipfscluster.io/news/ .

The most up-to-date Roadmap is available at https://ipfscluster.io/roadmap/ .

Install

Instructions for different installation methods (including from source) are available at https://ipfscluster.io/download .

Usage

Extensive usage information is provided at https://ipfscluster.io/documentation/ , including:

Contribute

PRs accepted. As part of the IPFS project, we have some contribution guidelines.

License

This library is dual-licensed under Apache 2.0 and MIT terms.

© 2022. Protocol Labs, Inc.

# Packages

Package adder implements functionality to add content to IPFS daemons managed by the Cluster.
No description provided by the author
Package api holds declarations for types used in ipfs-cluster APIs to make them re-usable across differen tools.
No description provided by the author
Package cmdutils contains utilities to facilitate building of command line applications launching cluster peers.
Package config provides interfaces and utilities for different Cluster components to register, read, write and validate configuration sections stored in a central configuration file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package observations sets up metric and trace exporting for IPFS cluster.
No description provided by the author
Package pstoremgr provides a Manager that simplifies handling addition, listing and removal of cluster peer multiaddresses from the libp2p Host.
Package rpcutil provides utility methods to perform go-libp2p-gorpc calls, particularly gorpc.MultiCall().
Package state holds the interface that any state implementation for IPFS Cluster must satisfy.
Package test offers testing utilities for all the IPFS Cluster codebase, like IPFS daemon and RPC mocks and pre-defined testing CIDs.
Package version stores version information for IPFS Cluster.

# Functions

DecodeClusterSecret parses a hex-encoded string, checks that it is exactly 32 bytes long and returns its value as a byte-slice.x.
EncodeProtectorKey converts a byte slice to its hex string representation.
NewCluster builds a new IPFS Cluster peer.
NewClusterHost creates a fully-featured libp2p Host with the options from the provided cluster configuration.
PeersFromMultiaddrs returns all the different peers in the given addresses.
RPCServiceID returns the Service ID for the given RPCAPI object.
SetFacilityLogLevel sets the log level for a given module.

# Constants

Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
Configuration defaults.
RPCClosed endpoints can only be called by the local cluster peer on itself.
RPCOpen endpoints can be called by any peer in the Cluster swarm.
RPCTrusted endpoints can be called by "trusted" peers.

# Variables

DefaultListenAddrs contains TCP and QUIC listen addresses.
DefaultRPCPolicy associates all rpc endpoints offered by cluster peers to an endpoint type.
LoggingFacilities provides a list of logging identifiers used by cluster and their default logging level.
LoggingFacilitiesExtra provides logging identifiers used in ipfs-cluster dependencies, which may be useful to display.
ReadyTimeout specifies the time before giving up during startup (waiting for consensus to be ready) It may need adjustment according to timeouts in the consensus layer.

# Structs

Cluster is the main IPFS cluster component.
ClusterRPCAPI is a go-libp2p-gorpc service which provides the internal peer API for the main cluster component.
Config is the configuration object containing customizable variables to initialize the main ipfs-cluster component.
ConnMgrConfig configures the libp2p host connection manager.
ConsensusRPCAPI is a go-libp2p-gorpc service which provides the internal peer API for the Consensus component.
IPFSConnectorRPCAPI is a go-libp2p-gorpc service which provides the internal peer API for the IPFSConnector component.
PeerMonitorRPCAPI is a go-libp2p-gorpc service which provides the internal peer API for the PeerMonitor component.
PinTrackerRPCAPI is a go-libp2p-gorpc service which provides the internal peer API for the PinTracker component.
ResourceMgrConfig configures the libp2p resource manager scaling.

# Interfaces

API is a component which offers an API for Cluster.
Component represents a piece of ipfscluster.
Consensus is a component which keeps a shared state in IPFS Cluster and triggers actions on updates to that state.
Informer provides Metric information from a peer.
IPFSConnector is a component which allows cluster to interact with an IPFS daemon.
Peered represents a component which needs to be aware of the peers in the Cluster and of any changes to the peer set.
PeerMonitor is a component in charge of publishing a peer's metrics and reading metrics from other peers in the cluster.
PinAllocator decides where to pin certain content.
PinTracker represents a component which tracks the status of the pins in this cluster and ensures they are in sync with the IPFS daemon.
Tracer implements Component as a way to shutdown and flush and remaining traces.

# Type aliases

RPCEndpointType controls how access is granted to an RPC endpoint.