A vibe coded tangled fork which supports pijul.
1package knotmirror
2
3import (
4 "github.com/prometheus/client_golang/prometheus"
5 "github.com/prometheus/client_golang/prometheus/promauto"
6)
7
8// Resync metrics
9var (
10 // TODO:
11 // - working / waiting resycner counts
12 resyncsStarted = promauto.NewCounter(prometheus.CounterOpts{
13 Name: "knotmirror_resyncs_started_total",
14 Help: "Total number of repo resyncs started",
15 })
16 resyncsCompleted = promauto.NewCounter(prometheus.CounterOpts{
17 Name: "knotmirror_resyncs_completed_total",
18 Help: "Total number of repo resyncs completed",
19 })
20 resyncsFailed = promauto.NewCounter(prometheus.CounterOpts{
21 Name: "knotmirror_resyncs_failed_total",
22 Help: "Total number of repo resyncs failed",
23 })
24 resyncDuration = promauto.NewHistogram(prometheus.HistogramOpts{
25 Name: "knotmirror_resync_duration_seconds",
26 Help: "Duration of repo resync operations",
27 Buckets: prometheus.ExponentialBuckets(0.1, 2, 12),
28 })
29)