Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintReport ¶ added in v0.5.1
func PrintReport(report *HealthReport)
Types ¶
type AssetHealth ¶ added in v0.4.1
type AssetHealth struct {
Total int `json:"total"`
Healthy int `json:"healthy"`
Failed int `json:"failed"`
// Interrupted counts assets whose last sync attempt was cancelled
// (state.Asset.Cause == logging.CauseCancelled) rather than
// genuinely failed. Deliberately excluded from Failed and from
// updateStatus's warning trigger — nothing is actually wrong; the
// next sync will simply retry them.
Interrupted int `json:"interrupted,omitempty"`
}
type DiskHealth ¶ added in v0.3.0
type HealthReport ¶
type HealthReport struct {
GeneratedAt string `json:"generated_at"`
Status string `json:"status"`
Repositories AssetHealth `json:"repositories"`
Gists AssetHealth `json:"gists"`
Quarantine QuarantineHealth `json:"quarantine"`
// Orphaned lists mirrors on disk that discovery no longer lists.
// Informational only: it never affects Status, because nothing is
// broken. See mirror.FindOrphans.
Orphaned OrphanHealth `json:"orphaned"`
Sync SyncHealth `json:"sync"`
Snapshots SnapshotHealth `json:"snapshots"`
Disks []DiskHealth `json:"disks"`
Retention RetentionHealth `json:"retention"`
Warnings []string `json:"warnings,omitempty"`
Recommendations []string `json:"recommendations,omitempty"`
}
type OrphanHealth ¶ added in v0.5.6
type OrphanHealth struct {
// Mirrors are intact backups that `gitback sync` no longer updates.
Mirrors OrphanList `json:"mirrors"`
// Quarantine holds corrupt mirrors whose upstream is also gone, so
// automatic recovery can never happen.
Quarantine OrphanList `json:"quarantine"`
}
OrphanHealth separates intact-but-no-longer-updated mirrors from quarantined ones, because the appropriate action differs.
type OrphanList ¶ added in v0.5.6
type OrphanList struct {
Repositories []string `json:"repositories,omitempty"`
Gists []string `json:"gists,omitempty"`
}
OrphanList is a set of mirror names, split by kind.
func (OrphanList) Count ¶ added in v0.5.6
func (l OrphanList) Count() int
Count returns the total number of names in the list.
type QuarantineHealth ¶ added in v0.5.1
type RetentionHealth ¶ added in v0.3.0
type SnapshotHealth ¶ added in v0.3.0
type SyncHealth ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.