modulepackage
0.2.10
Repository: https://github.com/dcnetio/go-ipfs-gcpinner.git
Documentation: pkg.go.dev
# README
go-ipfs-pinner
Background
The gcpinner adds GC function on the basis of go-ipfs-pinner
Install
Via go get
:
$go get github.com/dcnetio/go-ipfs-gcpinner
Requires Go 1.13
License
This library is dual-licensed under Apache 2.0 and MIT terms.
Copyright 2019. Protocol Labs, Inc.
# Functions
ModeToString returns a human-readable name for the Mode.
StringToMode parses the result of ModeToString() back to a Mode.
# Constants
Any refers to any pinned cid.
Direct pins pin just the target cid.
Indirect pins are cids who have some ancestor pinned recursively.
Internal pins are cids used to keep the internal state of the pinner.
NotPinned.
Recursive pins pin the target cids along with any reachable children.
# Variables
ErrNotPinned is returned when trying to unpin items that are not pinned.
# Structs
BloomFilterOptions is a struct that contains the options for a BloomFilter used by the GC.Fp is the false positive rate, and KeyNum is the number of keys.
Pinned represents CID which has been pinned with a pinning strategy.
Result represents an incremental output from a garbage collection run.
# Interfaces
A Pinner provides the necessary methods to keep track of Nodes which are to be kept locally, according to a pin mode.
# Type aliases
Mode allows to specify different types of pin (recursive, direct etc.).