internalcmd

package
v1.86.0-rc Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilewalkerCfg

type FilewalkerCfg struct {
	lazyfilewalker.Config
}

FilewalkerCfg is the config structure for the lazyfilewalker commands.

func (*FilewalkerCfg) DatabaseConfig

func (config *FilewalkerCfg) DatabaseConfig() storagenodedb.Config

DatabaseConfig returns the storagenodedb.Config that should be used with this lazyfilewalker.

type LazyFilewalkerCmd added in v1.81.2

type LazyFilewalkerCmd struct {
	Command *cobra.Command
	*RunOptions
}

LazyFilewalkerCmd is a wrapper for the lazyfilewalker commands.

func NewGCFilewalkerCmd

func NewGCFilewalkerCmd() *LazyFilewalkerCmd

NewGCFilewalkerCmd creates a new cobra command for running garbage collection filewalker.

func NewUsedSpaceFilewalkerCmd

func NewUsedSpaceFilewalkerCmd() *LazyFilewalkerCmd

NewUsedSpaceFilewalkerCmd creates a new cobra command for running used-space calculation filewalker.

func (*LazyFilewalkerCmd) Run added in v1.81.2

func (cmd *LazyFilewalkerCmd) Run() error

Run runs the LazyFileWalker.

func (*LazyFilewalkerCmd) SetArgs added in v1.81.2

func (cmd *LazyFilewalkerCmd) SetArgs(args []string)

SetArgs sets arguments for the command. The command or executable path should be passed as the first argument.

func (*LazyFilewalkerCmd) Start added in v1.81.2

func (cmd *LazyFilewalkerCmd) Start() error

Start starts the LazyFileWalker command, assuming it behaves like the Start method on exec.Cmd. This is a no-op and only exists to satisfy the execwrapper.Command interface. Wait must be called to actually run the command.

func (*LazyFilewalkerCmd) Wait added in v1.81.2

func (cmd *LazyFilewalkerCmd) Wait() error

Wait waits for the LazyFileWalker to finish, assuming it behaves like the Wait method on exec.Cmd.

type RunOptions

type RunOptions struct {
	Ctx    context.Context
	Logger *zap.Logger
	// contains filtered or unexported fields
}

RunOptions defines the options for the lazyfilewalker runners.

func (*RunOptions) SetErr

func (r *RunOptions) SetErr(writer io.Writer)

SetErr sets the stderr writer.

func (*RunOptions) SetIn

func (r *RunOptions) SetIn(reader io.Reader)

SetIn sets the stdin reader.

func (*RunOptions) SetOut

func (r *RunOptions) SetOut(writer io.Writer)

SetOut sets the stdout writer.

Jump to

Keyboard shortcuts

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