From efa4907565e2110c3203ec0986d43dcb6bed323d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 2 May 2015 08:55:43 -0700 Subject: [PATCH] core/corerepo/pinning: Add a package comment Currently garbage collection is triggered manually and there are no age-restrictions on the removal. I expect we'll eventually follow Git and auto-launch garbage collection when we hit some threshold of disk consumption (gc.auto). I expect we'll also follow Git and keep unpinned or unreachable objects (gc.pruneexpire, etc.). But we don't seem to do either of those yet. --- core/corerepo/pinning.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/corerepo/pinning.go b/core/corerepo/pinning.go index 81acba43e..cf2762713 100644 --- a/core/corerepo/pinning.go +++ b/core/corerepo/pinning.go @@ -1,3 +1,16 @@ +/* +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. +*/ package corerepo import (