Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOverrides ¶
ApplyOverrides merges CLI flag values into a loaded Config struct.
Types ¶
type Options ¶
type Options struct {
LogFormat logging.LogFormat // LogFormat determines the output format (e.g. text or JSON) for logging.
ConfigFile string // ConfigFile is the path to the YAML configuration file for snapraid-runner.
DryRun bool // DryRun, when true, skips actual sync/scrub/smart steps (simulates only).
Verbose bool // Verbose, when true, enables verbose logging output.
OutputDir string // OutputDir is the directory where JSON result files will be written (if non-empty).
NoNotify bool // NoNotify disables Slack notifications when true.
Steps StepsOptions // Steps contains which SnapRAID subcommands ("touch", "scrub", "smart") to execute.
Thresholds ThresholdOptions // Thresholds contains which threshold checks (add/remove/update/…) are enabled.
ScrubPlan int // ScrubPlan is the percentage (0–100) passed to the "scrub" subcommand.
ScrubOlder int // ScrubOlder is the "older-than" age (in days) passed to the "scrub" subcommand.
}
Options holds all configuration values parsed from CLI flags.
func ParseFlags ¶
ParseFlags parses CLI flags into a structured Options instance. It also handles --help and --version, returning a HelpRequested error when appropriate.
type StepsOptions ¶
type StepsOptions struct {
NoTouch bool // Touch enables the "snapraid touch" step.
NoScrub bool // Scrub enables the "snapraid scrub" step.
NoSmart bool // Smart enables the "snapraid smart" step.
}
StepsOptions defines which SnapRAID subcommands ("touch", "scrub", "smart") should run.
type ThresholdOptions ¶
type ThresholdOptions struct {
NoAdd bool // Add controls whether the "added files" threshold check is active.
NoRemove bool // Remove controls whether the "removed files" threshold check is active.
NoUpdate bool // Update controls whether the "updated files" threshold check is active.
NoCopy bool // Copy controls whether the "copied files" threshold check is active.
NoMove bool // Move controls whether the "moved files" threshold check is active.
NoRestore bool // Restore controls whether the "restored files" threshold check is active.
}
ThresholdOptions defines which threshold checks are enabled or disabled.
Click to show internal directories.
Click to hide internal directories.