Documentation ¶
Index ¶
- Variables
- func ColoredSet(ctx context.Context, pn pin.Pinner, ls dag.LinkService, ...) (*cid.Set, error)
- func Descendants(ctx context.Context, getLinks dag.GetLinks, set *cid.Set, roots []*cid.Cid) error
- func GC(ctx context.Context, bs bstore.GCBlockstore, ls dag.LinkService, pn pin.Pinner, ...) <-chan Result
- type CannotDeleteBlockError
- type CannotFetchLinksError
- type Result
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotDeleteSomeBlocks = errors.New("garbage collection incomplete: could not delete some blocks")
View Source
var ErrCannotFetchAllLinks = errors.New("garbage collection aborted: could not retrieve some links")
Functions ¶
func ColoredSet ¶
func ColoredSet(ctx context.Context, pn pin.Pinner, ls dag.LinkService, bestEffortRoots []*cid.Cid, output chan<- Result) (*cid.Set, error)
ColoredSet computes the set of nodes in the graph that are pinned by the pins in the given pinner.
func Descendants ¶
func GC ¶
func GC(ctx context.Context, bs bstore.GCBlockstore, ls dag.LinkService, pn pin.Pinner, bestEffortRoots []*cid.Cid) <-chan Result
GC performs a mark and sweep garbage collection of the blocks in the blockstore first, it creates a 'marked' set and adds to it the following: - all recursively pinned blocks, plus all of their descendants (recursively) - bestEffortRoots, plus all of its descendants (recursively) - all directly pinned blocks - all blocks utilized internally by the pinner
The routine then iterates over every block in the blockstore and deletes any block that is not found in the marked set.
Types ¶
type CannotDeleteBlockError ¶ added in v0.4.8
func (*CannotDeleteBlockError) Error ¶ added in v0.4.8
func (e *CannotDeleteBlockError) Error() string
type CannotFetchLinksError ¶ added in v0.4.8
func (*CannotFetchLinksError) Error ¶ added in v0.4.8
func (e *CannotFetchLinksError) Error() string
Click to show internal directories.
Click to hide internal directories.