rtfscluster

package
v2.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package rtfscluster provides utility functions for interacting with IPFS cluster APIs

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) DecodeHashString

func (cm *ClusterManager) DecodeHashString(cidString string) (gocid.Cid, error)

DecodeHashString is used to take a hash string, and turn it into a CID

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) 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