lazyfilewalker

package
v1.78.0-rc Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// TODO: just trying to match the names in storagenodedb.Config. Change these to be more descriptive.
	Storage   string `help:"path to the storage database directory"`
	Info      string `help:"path to the piecestore db"`
	Info2     string `help:"path to the info database"`
	Driver    string `help:"database driver to use" default:"sqlite3"`
	Pieces    string `help:"path to store pieces in"`
	Filestore filestore.Config
}

Config is the config for lazyfilewalker process.

func (*Config) Args

func (config *Config) Args() []string

Args returns the flags to be passed lazyfilewalker process.

type Supervisor

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

Supervisor performs filewalker operations in a subprocess with lower I/O priority.

func NewSupervisor

func NewSupervisor(log *zap.Logger, executable string, args []string) *Supervisor

NewSupervisor creates a new lazy filewalker Supervisor.

func (*Supervisor) WalkAndComputeSpaceUsedBySatellite

func (fw *Supervisor) WalkAndComputeSpaceUsedBySatellite(ctx context.Context, satelliteID storj.NodeID) (piecesTotal int64, piecesContentSize int64, err error)

WalkAndComputeSpaceUsedBySatellite returns the total used space by satellite.

type UsedSpaceRequest

type UsedSpaceRequest struct {
	SatelliteID storj.NodeID `json:"satelliteID"`
}

UsedSpaceRequest is the request struct for the used-space-filewalker process.

type UsedSpaceResponse

type UsedSpaceResponse struct {
	PiecesTotal       int64 `json:"piecesTotal"`
	PiecesContentSize int64 `json:"piecesContentSize"`
}

UsedSpaceResponse is the response struct for the used-space-filewalker process.

Jump to

Keyboard shortcuts

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