Documentation
¶
Index ¶
- Variables
- type CooldownEvents
- type Entry
- type EventCatalog
- type GitHubEvents
- type HealthEvents
- 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: "repo_discovery_started", DiscoveryCompleted: "repo_discovery_completed", DiscoveryFailed: "repo_discovery_failed", }, 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", 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", }, Snapshot: SnapshotEvents{ Started: "snapshot_started", Completed: "snapshot_completed", Failed: "snapshot_failed", VerificationStarted: "snapshot_verification_started", VerificationPassed: "snapshot_verification_passed", VerificationFailed: "snapshot_verification_failed", }, 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", }, Cooldown: CooldownEvents{ Started: "cooldown_started", }, Restore: RestoreEvents{ Started: "restore_started", Completed: "restore_completed", Failed: "restore_failed", }, }
Functions ¶
This section is empty.
Types ¶
type CooldownEvents ¶
type CooldownEvents struct {
Started 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
Mirror MirrorEvents
Snapshot SnapshotEvents
Lock LockEvents
Health HealthEvents
Restore RestoreEvents
Sync SyncEvents
Cooldown CooldownEvents
}
type GitHubEvents ¶
type HealthEvents ¶
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 SyncEvents ¶
Click to show internal directories.
Click to hide internal directories.