Documentation
¶
Overview ¶
Package migrate resolves a migration plan into concrete repository migrations and executes them against the target Forgejo instance with a bounded worker pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
Source SourceSpec
TargetOwner string
Options forgejo.Options
}
Job pairs a source with resolved options and an optional target-owner override.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes migration plans.
type Settings ¶
type Settings struct {
Concurrency int
RateLimit int
SkipExisting bool
DryRun bool
// MigrateTimeout bounds one migration call, and the reconciliation that
// follows when the call times out.
MigrateTimeout time.Duration
// ReconcileInterval is how often the target is polled while reconciling.
ReconcileInterval time.Duration
// ProgressInterval is how often a running migration's target repository is
// polled to report what it has imported so far. Zero switches reporting off.
ProgressInterval time.Duration
// MigrateRetries is how many extra attempts a migration gets after one
// that was cut short and left nothing usable on the target. Zero, the
// default, migrates each repository at most once.
MigrateRetries int
// ReplaceIncomplete allows deleting a leftover from an interrupted
// migration on the target and migrating again in its place.
ReplaceIncomplete bool
// AdoptExistingFiles allows adopting repository files left on the target's
// disk. Requires a site admin token.
AdoptExistingFiles bool
// ReplaceExisting widens ReplaceIncomplete to a repository that already
// holds content, which is what a migration that failed partway through
// leaves behind. The target cannot tell such a repository apart from one
// an earlier run migrated successfully, so this is the caller's call.
ReplaceExisting bool
}
Settings are resolved run-level controls.
Click to show internal directories.
Click to hide internal directories.