Documentation
¶
Overview ¶
Package corerepo provides pinning and garbage collection for local IPFS block services.
IPFS nodes will keep local copies of any object that have either been added or requested locally. Not all of these objects are worth preserving forever though, so the node adminstrator can pin objects they want to keep and unpin objects that they don't care about.
Garbage collection sweeps iterate through the local block store removing objects that aren't pinned, which frees storage space for new objects.
Index ¶
- Variables
- func BestEffortRoots(filesRoot *mfs.Root) ([]key.Key, error)
- func ConditionalGC(ctx context.Context, node *core.IpfsNode, offset uint64) error
- func GarbageCollect(n *core.IpfsNode, ctx context.Context) error
- func GarbageCollectAsync(n *core.IpfsNode, ctx context.Context) (<-chan *KeyRemoved, error)
- func PeriodicGC(ctx context.Context, node *core.IpfsNode) error
- func Pin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) ([]key.Key, error)
- func Unpin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) ([]key.Key, error)
- type GC
- type KeyRemoved
- type Stat
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxStorageExceeded = errors.New("Maximum storage limit exceeded. Maybe unpin some files?")
Functions ¶
func BestEffortRoots ¶ added in v0.4.3
func BestEffortRoots(filesRoot *mfs.Root) ([]key.Key, error)
func ConditionalGC ¶ added in v0.3.10
func ConditionalGC(ctx context.Context, node *core.IpfsNode, offset uint64) error
func GarbageCollect ¶
func GarbageCollect(n *core.IpfsNode, ctx context.Context) error
func GarbageCollectAsync ¶
func GarbageCollectAsync(n *core.IpfsNode, ctx context.Context) (<-chan *KeyRemoved, error)
func PeriodicGC ¶ added in v0.3.10
func PeriodicGC(ctx context.Context, node *core.IpfsNode) error
Types ¶
type GC ¶ added in v0.3.10
type GC struct {
Node *core.IpfsNode
Repo repo.Repo
StorageMax uint64
StorageGC uint64
SlackGB uint64
Storage uint64
}
type KeyRemoved ¶
type KeyRemoved struct {
Key key.Key
}
Click to show internal directories.
Click to hide internal directories.