Add status page enhancements with new metrics and footer
- Add GC statistics (run count, total/last pause, heap usage) - Add BGP peer count tracking from RIS Live OPEN/NOTIFICATION messages - Add route churn rate metric (announcements + withdrawals per second) - Add announcement and withdrawal counters - Add footer with attribution, license, and git revision - Embed git revision at build time via ldflags - Update HTML template to display all new metrics
This commit is contained in:
34
internal/version/version.go
Normal file
34
internal/version/version.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// Package version provides build version information
|
||||
package version
|
||||
|
||||
// Build-time variables set via ldflags
|
||||
//
|
||||
//nolint:gochecknoglobals // These must be variables to allow ldflags injection at build time
|
||||
var (
|
||||
// GitRevision is the git commit hash
|
||||
GitRevision = "unknown"
|
||||
// GitRevisionShort is the short git commit hash (7 chars)
|
||||
GitRevisionShort = "unknown"
|
||||
)
|
||||
|
||||
const (
|
||||
// Name is the program name
|
||||
Name = "routewatch"
|
||||
// Author is the program author
|
||||
Author = "@sneak"
|
||||
// AuthorURL is the author's website
|
||||
AuthorURL = "https://sneak.berlin"
|
||||
// License is the program license
|
||||
License = "WTFPL"
|
||||
// RepoURL is the git repository URL
|
||||
RepoURL = "https://git.eeqj.de/sneak/routewatch"
|
||||
)
|
||||
|
||||
// CommitURL returns the URL to view the current commit
|
||||
func CommitURL() string {
|
||||
if GitRevision == "unknown" {
|
||||
return RepoURL
|
||||
}
|
||||
|
||||
return RepoURL + "/commit/" + GitRevision
|
||||
}
|
||||
Reference in New Issue
Block a user