Documentation ¶
Index ¶
- func NewGCFilewalkerCmd() *cobra.Command
- func NewUsedSpaceFilewalkerCmd() *cobra.Command
- type FilewalkerCfg
- type GCLazyFileWalker
- type RunOptions
- type UsedSpaceLazyFileWalker
- func (u *UsedSpaceLazyFileWalker) Run() (err error)
- func (u *UsedSpaceLazyFileWalker) SetErr(writer io.Writer)
- func (u *UsedSpaceLazyFileWalker) SetIn(reader io.Reader)
- func (u *UsedSpaceLazyFileWalker) SetOut(writer io.Writer)
- func (u *UsedSpaceLazyFileWalker) Start() error
- func (u *UsedSpaceLazyFileWalker) Wait() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGCFilewalkerCmd ¶
NewGCFilewalkerCmd creates a new cobra command for running garbage collection filewalker.
func NewUsedSpaceFilewalkerCmd ¶
NewUsedSpaceFilewalkerCmd creates a new cobra command for running used-space calculation filewalker.
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 GCLazyFileWalker ¶
type GCLazyFileWalker struct {
*RunOptions
}
GCLazyFileWalker is an execwrapper.Command for the gc-filewalker.
func NewGCLazyFilewalker ¶
func NewGCLazyFilewalker(ctx context.Context, logger *zap.Logger, config lazyfilewalker.Config) *GCLazyFileWalker
NewGCLazyFilewalker creates a new GCLazyFileWalker instance.
func NewGCLazyFilewalkerWithConfig ¶
func NewGCLazyFilewalkerWithConfig(ctx context.Context, logger *zap.Logger, config *FilewalkerCfg) *GCLazyFileWalker
NewGCLazyFilewalkerWithConfig creates a new GCLazyFileWalker instance with the given config.
func (*GCLazyFileWalker) Run ¶
func (g *GCLazyFileWalker) Run() (err error)
Run runs the GCLazyFileWalker.
func (*GCLazyFileWalker) SetErr ¶
func (g *GCLazyFileWalker) SetErr(writer io.Writer)
SetErr sets the stderr of the GCLazyFileWalker.
func (*GCLazyFileWalker) SetIn ¶
func (g *GCLazyFileWalker) SetIn(reader io.Reader)
SetIn sets the stdin of the GCLazyFileWalker.
func (*GCLazyFileWalker) SetOut ¶
func (g *GCLazyFileWalker) SetOut(writer io.Writer)
SetOut sets the stdout of the GCLazyFileWalker.
func (*GCLazyFileWalker) Start ¶
func (g *GCLazyFileWalker) Start() error
Start starts the GCLazyFileWalker, 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 (*GCLazyFileWalker) Wait ¶
func (g *GCLazyFileWalker) Wait() error
Wait waits for the GCLazyFileWalker to finish, assuming it behaves like the Wait method on exec.Cmd.
type RunOptions ¶
type RunOptions struct { Ctx context.Context Logger *zap.Logger Config *FilewalkerCfg // contains filtered or unexported fields }
RunOptions defines the options for the lazyfilewalker runners.
func DefaultRunOpts ¶
func DefaultRunOpts(ctx context.Context, logger *zap.Logger, config *FilewalkerCfg) *RunOptions
DefaultRunOpts returns the default RunOptions.
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.
type UsedSpaceLazyFileWalker ¶
type UsedSpaceLazyFileWalker struct {
*RunOptions
}
UsedSpaceLazyFileWalker is an execwrapper.Command for the used-space-filewalker.
func NewUsedSpaceLazyFilewalker ¶
func NewUsedSpaceLazyFilewalker(ctx context.Context, logger *zap.Logger, config lazyfilewalker.Config) *UsedSpaceLazyFileWalker
NewUsedSpaceLazyFilewalker creates a new UsedSpaceLazyFileWalker instance.
func NewUsedSpaceLazyFilewalkerWithConfig ¶
func NewUsedSpaceLazyFilewalkerWithConfig(ctx context.Context, logger *zap.Logger, config *FilewalkerCfg) *UsedSpaceLazyFileWalker
NewUsedSpaceLazyFilewalkerWithConfig creates a new UsedSpaceLazyFileWalker instance with the given config.
func (*UsedSpaceLazyFileWalker) Run ¶
func (u *UsedSpaceLazyFileWalker) Run() (err error)
Run runs the UsedSpaceLazyFileWalker.
func (*UsedSpaceLazyFileWalker) SetErr ¶
func (u *UsedSpaceLazyFileWalker) SetErr(writer io.Writer)
SetErr sets the stderr of the UsedSpaceLazyFileWalker.
func (*UsedSpaceLazyFileWalker) SetIn ¶
func (u *UsedSpaceLazyFileWalker) SetIn(reader io.Reader)
SetIn sets the stdin of the UsedSpaceLazyFileWalker.
func (*UsedSpaceLazyFileWalker) SetOut ¶
func (u *UsedSpaceLazyFileWalker) SetOut(writer io.Writer)
SetOut sets the stdout of the UsedSpaceLazyFileWalker.
func (*UsedSpaceLazyFileWalker) Start ¶
func (u *UsedSpaceLazyFileWalker) Start() error
Start starts the GCLazyFileWalker, 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 (*UsedSpaceLazyFileWalker) Wait ¶
func (u *UsedSpaceLazyFileWalker) Wait() error
Wait waits for the GCLazyFileWalker to finish, assuming it behaves like the Wait method on exec.Cmd.