Release v1.0.0 #major
release / goreleaser (push) Failing after 51s

This commit is contained in:
2026-06-02 23:12:36 -05:00
parent 276981a7df
commit d5e65fbb03
17 changed files with 3447 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
// Package stats holds process-wide observability counters shared across packages.
package stats
import (
"sync/atomic"
"time"
)
// Stats are process-wide atomic counters. A single global instance is used so
// any package can record events without dependency injection plumbing.
type Stats struct {
StartTime time.Time
UDPPackets atomic.Int64
UDPBytes atomic.Int64
FramesWritten atomic.Int64
FramesDropped atomic.Int64
BytesBeforeCompr atomic.Int64
BytesAfterCompr atomic.Int64
LastUDPPacketUnix atomic.Int64 // unix nanos; 0 = never
}
// Global is the singleton used by all packages.
var Global = &Stats{StartTime: time.Now()}