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.
W. Trevor King committed
May 2, 2015 at 08:55 UTC
efa4907565e2110c3203ec0986d43dcb6bed323d
1 file changed
+13
core/corerepo/pinning.go
+13
@@ -1,3 +1,16 @@
1
+/*
2
+Package corerepo provides pinning and garbage collection for local
3
+IPFS block services.
4
+
5
+IPFS nodes will keep local copies of any object that have either been
6
+added or requested locally. Not all of these objects are worth
7
+preserving forever though, so the node adminstrator can pin objects
8
+they want to keep and unpin objects that they don't care about.
9
+
10
+Garbage collection sweeps iterate through the local block store
11
+removing objects that aren't pinned, which frees storage space for new
12
+objects.
13
+*/
14
package corerepo
15
16
import (