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 // contains filtered or unexported fields }
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 NewLazyFilewalkerCmd ¶ added in v1.100.2
func NewLazyFilewalkerCmd(command *cobra.Command, opts *RunOptions) *LazyFilewalkerCmd
NewLazyFilewalkerCmd creates a new instance of LazyFilewalkerCmd.
func NewTrashFilewalkerCmd ¶ added in v1.100.2
func NewTrashFilewalkerCmd() *LazyFilewalkerCmd
NewTrashFilewalkerCmd creates a new cobra command for running a trash cleanup 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.