pinner

package
v0.0.0-...-7864f83 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReplicationFactorMin = 1
	DefaultReplicationFactorMax = 3
	DefaultPinMode              = clusterapi.PinModeRecursive
)

Variables

View Source
var (
	ErrInvalidMultiaddrFormat = errors.New("invalid multiaddr format")
)

Functions

func ParseIPFromMultiaddr

func ParseIPFromMultiaddr(addr ma.Multiaddr) (net.IP, error)

Types

type Pinner

type Pinner interface {
	Add(pin models.Pin) error
	Remove(cid string) error
	Delegates() ([]string, error)

	// Controls
	SetReplicationFactor(min, max int) error
	SetPinMode(mode clusterapi.PinMode)
}

func New

func New(ctx context.Context, client cluster.Client) Pinner

Jump to

Keyboard shortcuts

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