Documentation
¶
Overview ¶
Package hooks runs the shell commands a backup is wrapped in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Runner ¶
type Runner struct {
Pre string
Post string
// Timeout bounds each hook; 0 means none.
Timeout time.Duration
// Stdout and Stderr receive the hooks' output; nil means the process's.
Stdout io.Writer
Stderr io.Writer
// Logger is where the runner reports; nil means slog.Default.
Logger *slog.Logger
}
Runner runs a backup's pre and post hooks through the system shell. Post runs under its own deadline even when the context is cancelled, so a quiesced server is released after an interrupted walk.
Click to show internal directories.
Click to hide internal directories.