Documentation
¶
Overview ¶
Package migrationgate decides whether the old instance is safe to delete. It is pure: callers pass in what the migration job recorded and what the live probes saw, and a gate only passes on evidence, never on absence of failure.
Index ¶
Constants ¶
View Source
const ( GateStaged = "staged" GateLeftovers = "leftovers" GateVolumes = "volumes" GateDatabases = "databases" GateRouted = "routed" GateDNS = "dns" GateResponds = "responds" GateBackup = "source-backup" GateTraffic = "traffic-cycle" )
Gate IDs, in the order they are evaluated. The last three double as the acknowledgment IDs a caller passes in Input.Acknowledged.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct {
Name string
// Status is the data copy status: verified, copying, failed, pending, or empty when never started.
Status string
Mismatched int
}
Database is one source database the selected apps use and the state of its data copy.
type Gate ¶
type Gate struct {
ID string `json:"id"`
Status Status `json:"status"`
Detail string `json:"detail"`
Open []string `json:"open,omitempty"`
Fix string `json:"fix,omitempty"`
}
Gate is one line of the checklist.
type Item ¶
type Item struct {
Name string
State string
Domains []string
Volumes []Volume
// Leftover is true for an unsupported resource the importer cannot move.
Leftover bool
}
Item uses the import state strings of the job: verified and routed count as proven here.
type Report ¶
type Report struct {
Safe bool `json:"safe_to_delete"`
Gates []Gate `json:"gates"`
Counts map[Status]int `json:"counts"`
Fallback []string `json:"fallback"`
}
Report is the checklist. Safe is true only when every gate passed.
Click to show internal directories.
Click to hide internal directories.