freeze

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unfreeze

func Unfreeze(ctx context.Context, dirPath string, freezeAtPercent float64, dstore datastore.Datastore) error

Types

type Freezer

type Freezer struct {
	// contains filtered or unexported fields
}

func New

func New(dirPath string, freezeAtPercent float64, dstore datastore.Datastore, freezeFunc func() error) (*Freezer, error)

New creates a new Freezer that checks the usage of the file system at dirPath.

func (*Freezer) CheckNow

func (f *Freezer) CheckNow() bool

CheckNow triggers an immediate disk usage check.

func (*Freezer) Close

func (f *Freezer) Close()

Close stops the goroutine that checks disk usage.

func (*Freezer) Freeze

func (f *Freezer) Freeze() error

Freeze manually triggers the indexer to enter frozen mode.

func (*Freezer) Frozen

func (f *Freezer) Frozen() bool

Frozen returns true if indexer is frozen.

func (*Freezer) Usage

func (f *Freezer) Usage() (*disk.UsageStats, error)

Jump to

Keyboard shortcuts

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