Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct {
InFlight atomic.Int64
Requests atomic.Uint64
Failures atomic.Uint64
Latency *Latency
// contains filtered or unexported fields
}
func NewActivity ¶
func NewActivity() *Activity
NewActivity instantiates operational tracking telemetry Manages concurrency inflight counters and throughput latency
func (*Activity) Close ¶ added in v0.1.0
func (at *Activity) Close()
Close shuts down the latency tracker
func (*Activity) EWMA ¶
EWMA delivers the latest known exponential weight average output Provides lock-free access to traffic speed approximations
func (*Activity) EndRequest ¶
EndRequest decreases active counts and archives the outcome performance Decrements immediately while asynchronously evaluating moving averages
func (*Activity) Snapshot ¶
Snapshot freezes ongoing values into a secure map extraction Yields current telemetry structures for reporting components
func (*Activity) StartRequest ¶
func (at *Activity) StartRequest()
StartRequest increases the active connection count Operates automatically and block-free for inbound traffic tracking
type BackendStats ¶
type BackendStats struct {
Activity *Activity
}
func (*BackendStats) Close ¶
func (s *BackendStats) Close()
type Latency ¶
type Latency struct {
// contains filtered or unexported fields
}
func NewLatency ¶
func NewLatency() *Latency
NewLatency creates a sharded histogram with lazy allocation. Shards start as nil histograms; memory only consumed on actual traffic.
func (*Latency) Close ¶
func (lt *Latency) Close()
Close shuts down the latency tracker and stops background eviction
func (*Latency) Record ¶
Record adds a latency sample, allocating histogram on first use per shard. Rotates histograms on time windows; creates histograms lazily.
func (*Latency) Snapshot ¶
func (lt *Latency) Snapshot() LatencySnapshot
Snapshot aggregates all active shards into a unified latency view. Skips unallocated (idle) shards efficiently.
type LatencySnapshot ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) GetOrRegister ¶
func (r *Registry) GetOrRegister(key alaye.Key) *BackendStats