Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRetry = RetryOpts{ MaxAttempts: 3, BaseDelay: 200 * time.Millisecond, MaxDelay: 5 * time.Second, Multiplier: 2.0, }
DefaultRetry is the default retry configuration used with ErrorPolicyRetry.
Functions ¶
This section is empty.
Types ¶
type ErrorPolicy ¶
type ErrorPolicy int
ErrorPolicy controls what happens when a job fails.
const ( ErrorPolicySkip ErrorPolicy = iota // record error and continue ErrorPolicyStop // abort all remaining jobs ErrorPolicyRetry // retry with backoff )
func ParseErrorPolicy ¶
func ParseErrorPolicy(s string) (ErrorPolicy, error)
ParseErrorPolicy parses a string error policy name.
type Job ¶
type Job struct {
Source source.SourceFile
Route *router.Route
Sink *sink.Sink
Opts backend.Options
// BackendExtraArgs maps backend name → extra pandoc/ffmpeg/etc. args
// sourced from config.toml ([backend.<name>] extra_args = [...]).
// Merged into Opts.ExtraArgs at step-execution time; CLI-supplied args
// stay last so they override config.
BackendExtraArgs map[string][]string
}
Job is a single conversion unit.
type RetryOpts ¶
type RetryOpts struct {
MaxAttempts int // total attempts (1 = no retry, 0 defaults to DefaultRetry)
BaseDelay time.Duration // delay before second attempt
MaxDelay time.Duration
Multiplier float64 // delay multiplier per attempt (e.g. 2.0)
}
RetryOpts configures exponential backoff retry behaviour.
type RunOpts ¶
type RunOpts struct {
Workers int
OnError ErrorPolicy
OnConflict sink.ConflictPolicy
Retry RetryOpts
DryRun bool
Reporter progress.Reporter // nil → Noop
}
RunOpts configures the runner.
Click to show internal directories.
Click to hide internal directories.