Documentation
¶
Index ¶
- Variables
- type DoctorEvents
- type Entry
- type EventCatalog
- type FilesystemEvents
- type GitHubEvents
- type HealthEvents
- type InventoryEvents
- type Level
- type LockEvents
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Duration(event string, repo string, duration time.Duration)
- func (l *Logger) Emit(entry Entry)
- func (l *Logger) Error(event string, repo string, err error)
- func (l *Logger) Info(event string, repo string)
- func (l *Logger) Warn(event string, repo string, message string)
- type MirrorEvents
- type MirrorState
- type MirrorsState
- type RestoreEvents
- type SnapshotEvents
- type SyncEvents
Constants ¶
This section is empty.
Variables ¶
View Source
var Events = EventCatalog{ GitHub: GitHubEvents{ DiscoveryStarted: "discovery_started", DiscoveryCompleted: "discovery_completed", DiscoveryFailed: "discovery_failed", DiscoverySummary: "discovery_summary", PageFetched: "github_page_fetched", InventoryLoaded: "inventory_loaded", RateLimit: "github_rate_limit", }, Inventory: InventoryEvents{ Missing: "inventory_missing", Empty: "inventory_empty", }, Mirror: MirrorEvents{ CloneStarted: "mirror_clone_started", CloneCompleted: "mirror_clone_completed", CloneFailed: "mirror_clone_failed", UpdateStarted: "mirror_update_started", UpdateCompleted: "mirror_update_completed", UpdateFailed: "mirror_update_failed", Retry: "mirror_retry", FsckStarted: "mirror_fsck_started", FsckCompleted: "mirror_fsck_completed", FsckFailed: "mirror_fsck_failed", StateSaveFailed: "mirror_state_save_failed", }, Sync: SyncEvents{ Started: "sync_started", Completed: "sync_completed", Failed: "sync_failed", Summary: "sync_summary", }, Snapshot: SnapshotEvents{ Started: "snapshot_started", Completed: "snapshot_completed", Failed: "snapshot_failed", VerificationStarted: "snapshot_verification_started", VerificationPassed: "snapshot_verification_passed", VerificationFailed: "snapshot_verification_failed", ArchiveStarted: "snapshot_archive_started", ArchiveCompleted: "snapshot_archive_completed", CompressionStarted: "snapshot_compression_started", CompressionCompleted: "snapshot_compression_completed", ChecksumStarted: "snapshot_checksum_started", ChecksumCompleted: "snapshot_checksum_completed", Summary: "snapshot_summary", RetentionDisabled: "snapshot_retention_disabled", RetentionStarted: "snapshot_retention_started", RetentionCompleted: "snapshot_retention_completed", RetentionFailed: "snapshot_retention_failed", CollisionDetected: "snapshot_collision_detected", }, Lock: LockEvents{ Acquired: "lock_acquired", Released: "lock_released", Busy: "lock_busy", }, Health: HealthEvents{ LowDisk: "health_low_disk", RepoFailure: "health_repo_failure", StaleBackup: "health_stale_backup", HealthReport: "health_report_generated", }, Restore: RestoreEvents{ Started: "restore_started", Completed: "restore_completed", Failed: "restore_failed", }, Filesystem: FilesystemEvents{ DirectoryRecreated: "filesystem_directory_recreated", }, Doctor: DoctorEvents{ ReportGenerated: "doctor_report_generated", }, }
Functions ¶
This section is empty.
Types ¶
type DoctorEvents ¶ added in v0.4.7
type DoctorEvents struct {
ReportGenerated string
}
type Entry ¶
type Entry struct {
Timestamp string `json:"ts"`
Level Level `json:"level"`
Event string `json:"event"`
RunID string `json:"run_id,omitempty"`
Repo string `json:"repo,omitempty"`
DurationMS int64 `json:"duration_ms,omitempty"`
Error string `json:"error,omitempty"`
Details any `json:"details,omitempty"`
}
type EventCatalog ¶
type EventCatalog struct {
GitHub GitHubEvents
Inventory InventoryEvents
Mirror MirrorEvents
Snapshot SnapshotEvents
Lock LockEvents
Health HealthEvents
Restore RestoreEvents
Sync SyncEvents
Filesystem FilesystemEvents
Doctor DoctorEvents
}
type FilesystemEvents ¶ added in v0.4.4
type FilesystemEvents struct {
DirectoryRecreated string
}
type GitHubEvents ¶
type HealthEvents ¶
type InventoryEvents ¶ added in v0.4.4
type LockEvents ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
type MirrorEvents ¶
type MirrorState ¶
type MirrorsState ¶
type MirrorsState struct {
GeneratedAt string `json:"generated_at"`
Repositories []MirrorState `json:"repositories"`
}
type RestoreEvents ¶
type SnapshotEvents ¶
type SnapshotEvents struct {
Started string
Completed string
Failed string
VerificationStarted string
VerificationPassed string
VerificationFailed string
ArchiveStarted string
ArchiveCompleted string
CompressionStarted string
CompressionCompleted string
ChecksumStarted string
ChecksumCompleted string
Summary string
RetentionDisabled string
RetentionStarted string
RetentionCompleted string
RetentionFailed string
CollisionDetected string
}
Click to show internal directories.
Click to hide internal directories.