gc

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2016 License: Apache-2.0 Imports: 4 Imported by: 18

Documentation

Overview

gc provides the Torus interface for how garbage collection is implemented. Volumes implement a garbage collector and the controller in this package runs them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGC

func RegisterGC(name string, newFunc CreateGCFunc)

Types

type CreateGCFunc

type CreateGCFunc func(srv *torus.Server, inodes INodeFetcher) (GC, error)

type GC

type GC interface {
	PrepVolume(*models.Volume) error
	IsDead(torus.BlockRef) bool
	Clear()
}

func NewGCController

func NewGCController(srv *torus.Server, inodes INodeFetcher) GC

type INodeFetcher

type INodeFetcher interface {
	GetINode(context.Context, torus.INodeRef) (*models.INode, error)
}

type NullGC

type NullGC struct{}

func (*NullGC) Clear

func (n *NullGC) Clear()

func (*NullGC) IsDead

func (n *NullGC) IsDead(ref torus.BlockRef) bool

func (*NullGC) PrepVolume

func (n *NullGC) PrepVolume(_ *models.Volume) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL