rtfsc

package module
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README ΒΆ

🌐⚑🌐 rtfsc

codecov Build Status GoDoc

rtfsc provides programmatic access to IPFS Cluster API's

Documentation ΒΆ

Overview ΒΆ

Package rtfsc provides utility functions for interacting with IPFS cluster nodes and their restful api

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type ClusterManager ΒΆ

type ClusterManager struct {
	Config *client.Config
	Client client.Client
}

ClusterManager is a helper interface to interact with the cluster apis

func Initialize ΒΆ

func Initialize(ctx context.Context, hostAddress, hostPort string) (*ClusterManager, error)

Initialize is used to init, and return a cluster manager object

func (*ClusterManager) GenClient ΒΆ

func (cm *ClusterManager) GenClient() error

GenClient is used to generate a client to interact with the cluster

func (*ClusterManager) GenRestAPIConfig ΒΆ

func (cm *ClusterManager) GenRestAPIConfig()

GenRestAPIConfig is used to generate the api cfg needed to interact with the cluster

func (*ClusterManager) ListPeers ΒΆ

func (cm *ClusterManager) ListPeers(ctx context.Context) ([]*api.ID, error)

ListPeers is used to list the known cluster peers

func (*ClusterManager) Pin ΒΆ

func (cm *ClusterManager) Pin(ctx context.Context, cid gocid.Cid) (*api.Pin, error)

Pin is used to add a pin to the cluster

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL